GithubHelp home page GithubHelp logo

jjwxcnovelprofile's Introduction

jjwxcNovelProfile

爬取晋江文学城小说的简介和封面

用法

调用函数 search_jj_novel(book_keywork,author_keywork,search_pages,savepath)

参数

  • book_keywork:小说关键字
  • author_keywork:作者名字
  • search_pages:搜索页数
  • savepath:保存路径

补充

可以作者author_keywork设置为""进行全查找。 保存地址:

  • 保存路径:savepath = os.path.join(savepath,apicont["authorName"]).replace("*","x")
  • 小说简介:TOC_file="%s/%s - %s - 简介.txt"%(savepath,apicont["novelName"],apicont["authorName"])
  • 封面图片:img_file="%s/%s - %s - 封面.jpg"%(savepath,apicont["novelName"],apicont["authorName"])

我以"savepath/作者"作为具体的保存路径,所以有时作者被封,名字就会带星号"*",使用img_file.replace("*","x")将星号改为了x。

此外也可以注释掉"savepath = os.path.join(savepath,apicont["authorName"]).replace("*","x")",改为只保存在savepath路径下。

实例

小说界面

image

运行代码

  • 运行目录结构:image
  • 调用函数:image

爬取结果

  • 小说:image
  • 封面:image

jjwxcnovelprofile's People

Contributors

itzjuny avatar

Stargazers

zheng avatar Yao avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.