├── startApp.cmd ├── config.json ├── package.json ├── README.md └── app.js /startApp.cmd: -------------------------------------------------------------------------------- 1 | node app.js -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "address":"新街口", 3 | "jobarea":"070200", 4 | "startpage":0 5 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "51job", 3 | "version": "0.0.1", 4 | "description": "51job招聘信息下载", 5 | "main": "app.js", 6 | "dependencies": { 7 | "bufferhelper": "^0.2.0", 8 | "async": "^0.2.9", 9 | "cheerio": "^0.12.2", 10 | "iconv-lite": "^0.2.11" 11 | }, 12 | "devDependencies": {}, 13 | "scripts": { 14 | "test": "echo \"Error: no test specified\" && exit 1" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "https://github.com/lzxue/51job" 19 | }, 20 | "keywords": [ 21 | "thinkgis", 22 | "gis", 23 | "招聘信息", 24 | "51job" 25 | ], 26 | "author": "lzxue", 27 | "license": "ISC", 28 | "bugs": { 29 | "url": "https://github.com/lzxue/51job/issues" 30 | }, 31 | "homepage": "https://github.com/lzxue/51job" 32 | } 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ###下载51job招聘信息的爬虫程序 2 | 1.程序使用NodeJS编写,运行安装nodejs 3 | 4 | 2.下载的数据存储在文本文档中以&字符为分隔符,一条招聘信息为一行数据。 5 | 6 | 3.下载51job招聘信息,jobid,companyid 公司简介,岗位简介,经纬度等 7 | 8 | 9 | 10 | [原数据来自51job地图搜索](http://search.51job.com/jobsearch/search_result.php?fromJs=1&jobarea=010000&industrytype=00&issuedate=9&keywordtype=2&lang=c&stype=3&address=%E4%B8%AD%E5%85%B3%E6%9D%91&radius=0.03&fromType=20) 可根据自身需要修改url参数实现分类下载招聘数据。 11 | 12 | 地区查询一次下载整个地区的数据,程序中默认将查询半径设radius置1000(100000公里)旨在获取该地区的所有数据。但是数据最多返回10w条,向北京这样城市超过10w条数据因此需要设置多个中心点然后去重。 13 | 14 | 下载参数设置在config,json中 15 | 16 | { 17 | 18 | "address":"中关村", //搜索中心 19 | "jobarea":"010000", //搜索城市代码 20 | " startpage":0 //下载起始页码,默认为0 在下载出错时修改该值,改完出错时中断的页码,实现继续上次中断下载 21 | } 22 | 23 | 24 | windows下启动,修改下载参数,双击startapp.cmd 开始下载 25 | 26 | 城市代码表: 27 | 28 | *** 29 | 30 | 北京 31 | 天津 32 | 大连 33 | 沈阳 34 | 长春 35 | 哈尔滨 36 | 石家庄 37 | 38 | 39 |