Giter Site home page Giter Site logo

bossspider's Introduction

说明

参数:

query = '' #搜索关键词
city = 101220200 #城市代码,默认蚌埠
degree = '' #学历要求
industry = '' #公司行业
experience = '' #工作经验
position = '' #职业类型
salary = 404  #薪资待遇,默认5~10K
scale = '' #公司规模
stage = ''#融资阶段
timeDelay = 20 #每次打开网页延迟时间,数值太小可能网页加载不全导致抓取失败,请求速度太快导致被封。

城市代码(city)见:https://www.zhipin.com/wapi/zpCommon/data/cityGroup.json

工作经验(experience)、薪资待遇(salary)、融资阶段(stage)、公司规模(scale)、学历(degree)代码见:https://www.zhipin.com/wapi/zpgeek/search/job/condition.json

公司行业(industry)代码见:https://www.zhipin.com/wapi/zpCommon/data/industry.json

职业类型(position)代码见:https://www.zhipin.com/wapi/zpCommon/data/position.json

一、前置:

  1. 安装Chrome。

  2. 下载chromedriver 并配置环境变量,网盘备份:https://fuwenyue.lanzouy.com/ittRu0ck7gub

  3. pip install -r requirements.txt

二、运行代码:

运行代码有保存cookie运行爬虫两个选项:

  • 保存Cookie,运行后生成BossCookie.txt文件。

自动打开网站,手动登录。确认后自动保存Cookie。

  • 运行爬虫

自动Cookie登录,根据配置运行代码。

    jobs = ['数据','统计','excel','运营'] #搜索关键词
    city = 101220200 #城市代码
    pages = 10 #共抓取几页

运行完毕后生成个.xlsx文件。

bossspider's People

Contributors

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