Giter Site home page Giter Site logo

qidian_spider's Introduction

qidian_spider

此项目是基于scrapy,redis,tor,mongodb,graphite,实现的一个分布式网络爬虫。

使用scrapy-redis实现分布式,tor实现ip池,mongodb存储数据,graphite显示爬虫状态。

功能

   一个对https://www.qidian.com 网站的spider,把网站的书名、作者、书籍封面图片地址、书籍简介、网址链接、书籍评价、评论人数下载到本地mongodb。

爬虫被禁的策略

1. 禁用cookie
2. 实现了一个download middleware,不停的变user-aget
3. 实现了一个可以每分钟变换ip的tor(国内需要tor前置代理)
4. selenium获取动态加载数据

日志

log信息默认写到文件中logs/scrapy.log

安装

scrapy
graphite(可以采用docker)
redis
mongodb
tor
polipo
virtualenv

使用方法

1. source venv/bin/activate
2. pip install -r requirements.txt
3. 启动tor,polipo
4. 修改setting.py polipo端口
5. scrapy crawl qidian

graphite

graphite

log

log

qidian_spider's People

Contributors

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