0 Star 5 Fork 6

浅灵丶/pinduoduo_python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.py 706 Bytes
一键复制 编辑 原始数据 按行查看 历史
浅灵丶 提交于 2018-10-26 16:26 +08:00 . 完成项目前端展示代码
from product.goods import goods
import threading
import time
from pymongo import MongoClient
from product.mongodb import mongodb
from product.reviews import reviews
goods = goods.goods()
#爬取隐形眼镜数据
data = [
{'name':'隐形眼镜',"typeId":1},
{'name':'避孕套',"typeId":2},
{'name':'美瞳',"typeId":3},
{'name':'玻尿酸',"typeId":4}
]
startTime = time.time()
for key in data:
for index in range(1, 5):
t1 = threading.Thread(target=goods.selectByQuery, args=(key['name'], index, 50,key['typeId'],))
t1.setDaemon(True)
t1.start()
t1.join()
endTime = time.time()
print('商品数据爬取已完成,用时[{0}]'.format(endTime-startTime))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/qianlingooo/pinduoduo_python.git
git@gitee.com:qianlingooo/pinduoduo_python.git
qianlingooo
pinduoduo_python
pinduoduo_python
master

搜索帮助