Code Monkey home page Code Monkey logo

job-spider's Introduction

招聘网站爬虫

可爬取各大互联网行业常用招聘网站,采集职位主要信息输出到 csv 文件;
爬虫和文件写入独立两个进程,进程A对每个网站的爬虫启动多线程,每个爬虫以生成器方式迭代返回数据,通过队列传输给进程B进行写入;
注意:本爬虫仅供学习交流,请勿将爬取数据进行非法使用。

运行环境

  • Python 3
  • requests
  • lxml

运行方式

方法一:使用命令行参数
$ python3 run.py -j 后端 -c 北京

方法二:直接运行,根据提示输入参数
$ python3 run.py
请输入职业:后端
请输入城市:北京

配置

如果想自定义爬虫,可添加在spider.py末尾定义爬虫类,需要继承BaseSpider基类和关联SpiderMeta元类, 并且需要实现crawl方法迭代返回爬取数据,数据内容请参照已有爬虫类。

job-spider's People

Contributors

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