本软件仅用于学术研究,但因在中国大陆频频出现爬虫开发者涉诉与违规相关的新闻。
├─web 后端服务
├─spider python爬虫
│ ├─src/spider 爬虫实现
│ │ ├─zhipin.ts 直聘爬虫
├─word.json 生成的英文技术词json
├─word.py 生成英文分词
├─stop.txt 停用词列表
后端服务是使用koajs
编写的一个接口和展示数据的服务。
打开web/server/config/index.ts
修改自己的数据库的信息
cd web
npm install --registry https://registry.npmmirror.com/
#启动服务
npm run dev
请安装Nodejs
需要本地安装 chrome
、或者edge
浏览器
打开spider/src/index.ts
修改 executablePath
成 本地的浏览器路径
const options: PuppeteerLaunchOptions = {
// 启动无头浏览器
headless: 'new',
// 浏览器路径
executablePath: 'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe'
}
cd spider
npm install --registry https://registry.npmmirror.com/ --ignore-scripts #跳过下载chromium
#运行服务
npm run dev
#编译
npm run build