Giter Site home page Giter Site logo

webspider's Introduction

Lagou Spider

如果感觉项目还不错,给个 Star 吧  _(:з」∠)_

-- --
Version 1.0.0
WebSite http://www.jobinfo.cc:8000/
Source https://github.com/GuozhuHe/webspider
Keywords Python3, Tornado, Celery, Spider, Lagou, Requests

爬取到的数据分享链接: https://pan.baidu.com/s/1gfIi5gv 密码: gikp

关于本系统

本系统是一个主要使用python3, celeryrequests来爬取职位数据的爬虫,实现了定时任务,出错重试,日志记录,自动更改Cookies等的功能,并使用ECharts + Bootstrap 来构建前端页面,来展示爬取到的数据。

展示页面

Alt text

项目依赖

  • requests
  • sqlalchemy
  • python-redis
  • redis
  • mysqlclient
  • lxml
  • retrying
  • celery
  • tornado

安装使用

  • 克隆项目
git clone [email protected]:GuozhuHe/webspider.git
  • 安装 virtualenv (推荐使用方式)
pip install virtualenv
# 创建 python3 虚拟环境
virtualenv -p /usr/bin/python3 webspider
# 激活虚拟环境
source webspider/bin/activate
  • 安装 zc.buildout
pip3 intstall zc.buildout
  • 在项目根目录下构建
buildout
# 构建成功后项目的 bin/ 目录下会有可执行脚本
  • 启动 redismysql
# mac os 环境下
redis-server
mysql.server start
  • 执行单元测试
bin/test
  • 运行 Web Server
bin/web
  • 运行爬虫程序
# 启动定时任务分发器
bin/celery_beat
# 启动爬取 职位数据 的 worker(每个月自动执行一次)
bin/celery_lagou_data_worker
# 启动爬取 职位数量 的 worker(每天晚上自动执行一次)
bin/celery_jobs_count_worker 
  • bin目录下其他可执行脚本
# 直接爬取职位数量
bin/crawl_jobs_count        
# 直接爬取职位数据
bin/crawl_lagou_data       
# 启动celery监控 
bin/celery_flower            

其他常见问题

有问题?联系我解决:

webspider's People

Contributors

justforfunnnn avatar

Watchers

James Cloos avatar lyicy 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.