GithubHelp home page GithubHelp logo

doubanspider's Introduction

DoubanSpider

python 爬虫爬取豆瓣读书信息

程序主要是由 6 个函数组成:

get_html():请求页面,返回页面 html 源码。

get_pageurl(base_url):从 html 源码中提取分页链接部分字段。

def bookinfo(url):提取图书信息,以列表形式返回。

get_num(person):判断评价人数,没有评价人数的按 10 人处理。

write2csv():将图书信息保存为 csv 文件。

main():程序执行的主函数。

程序思路:

1.分析豆瓣读书链接,分析分页链接规律。

2.循环提取链接中书本信息。

3.将书本信息保存为 csv 文件

doubanspider's People

Contributors

brucepk 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.