Giter Site home page Giter Site logo

douban-group-spider's Introduction

说明

用于爬取豆瓣小组的爬虫。
此爬虫我主要用于了爬取豆瓣租房小组的帖子,支持关键字搜索以及发帖更新时间排序

依赖

  • gevent
  • pymongo
  • requests
  • lxml
  • Flask
  • boostrap

具体版本参见`requirements.txt`

特别说明

  • 由于豆瓣有防抓机制,故此爬虫使用了代理爬取,防止被封IP。
  • 可从网上收集代理IP,放在项目路径下proxy_list.txt
  • 每个一行,程序会自动加载,且可以自动定时加载新代理。
  • 或者参考我的代理采集器,自动采集代理。
  • 如果程序运行发现总是出现超时或者403,请更换proxy_list.txt下的代理。

使用

  • 安装MongoDB,具体参考安装文档。
  • 建议使用virtualenv环境
    pip install -r requirements.txt
  • 启动爬虫
    nohup python spider.py >> douban_spider.log &
  • 启动web服务
    nohup python app.py >> app.log &
  • 查看页面
    http://localhost:5000

配置

参数配置见config.py,例如MongoDB地址并发数爬取页数等。

douban-group-spider's People

Contributors

kaito-kidd 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.