https://github.com/tingge/web-spiders
网络蜘蛛🕷️
https://github.com/tingge/web-spiders
Last synced: 3 months ago
JSON representation
网络蜘蛛🕷️
- Host: GitHub
- URL: https://github.com/tingge/web-spiders
- Owner: TingGe
- License: mit
- Created: 2016-07-08T02:57:06.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-08T05:23:15.000Z (almost 10 years ago)
- Last Synced: 2025-02-01T02:43:57.704Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# web-spiders
网络蜘蛛🕷️
[TOC]
## 基于 NodeJS 的几种方案
大致思路是“抓取、解析、入库”,可选 “黑白名单、并发、定时任务”。
1. superagent/cheerio/express
2. superagent/cheerio/koa2/koa-router/eventproxy
3. request/cheerio/async/[node-schedule](https://github.com/node-schedule/node-schedule)
4. phantomjs/cheerio
### 案例
- express-spider
- koa2-spider
### 运行
1. 前提是需安装 nodejs
2. 在 express-spider 或 koa2-spider 目录执行
```shell
npm start
```
3. 然后浏览器访问 `http://127.0.0.1:3000` 或 `curl -get http://127.0.0.1` 即可
## 参考
- [[NodeJS爬虫](https://segmentfault.com/a/1190000004077827)](https://segmentfault.com/a/1190000004077827)
- [[用nodejs写爬虫同步百度FEX Weekly中的文章](https://segmentfault.com/a/1190000002423761)](https://segmentfault.com/a/1190000002423761)