sem爬虫需求

Ben 7447a03eff fix crawl_data 1 year ago
.gitignore aba9e4e521 first commit 1 year ago
README.md aba9e4e521 first commit 1 year ago
config.json aba9e4e521 first commit 1 year ago
paper2000.json aba9e4e521 first commit 1 year ago
requestments.txt aba9e4e521 first commit 1 year ago
spider.py 7447a03eff fix crawl_data 1 year ago

README.md

sem-spider

实现步骤

1、读取配置文件中的数据库参数;

2、连接数据库,并创建 papers 集合;

3、实现 /add_paper 端点,用于添加样本数据;

4、实现 /crawl_data 端点,用于爬取数据;

5、实现 worker 函数,用于处理爬取任务。

依赖

requirements.txt

requests
pymongo

运行方式

add_paper

python3 spider.py add_paper --path paper2000.json

crawl_data

python spider.py crawl_data