淘宝爬虫 TaoBaoCrawler

TaoBao Crawler

lucky-ing

星期一, 20. 十一月 2017 07:10下午

做图像处理和做物体识别检测的很多朋友都会有这样一个感受。没有数据集!!!!博主一直苦于没有数据集。而作为最大的,最集中的图片库–淘宝网(百度出来的图片的离散度太高)却无法使用简单的爬虫方式获取图片。(妹子图的爬虫+cook处理也没有用。。。)为此,博主使用了selenium仿真爬虫,这种爬虫的兼容性比较高,只是速度一般,5000张图片需要大约30min,如果爬一夜的话,估计就够我们用的了。源码在github仓库里。也可使用

git clone git@github.com:lucky-ing/TaoBaoCrawler.git

下载到本地。

2017-10-20更新!突破&终结淘宝全线封锁!


依赖项

firefox browser
python 3.0+
selenium
BeautifulSoup
tqdm

Tutorial

#this program uses firefox browser, we should have firefox browser in computer first.\n
#if we just use the base function of this program
#-s specific the key word of searching.you can input any word you want to scraper. this parameter is requested!
python3 main.py -s 电脑
 #-f specific the path where Image storage location
python3 main.py -s 电脑 -f ./image
#-n specific the max num of the downloads
python3 main.py -s 电脑 -n 5000

tb


about the selenium

selenium is a Automated testing tool, it can run browser automatly. Taobao have anti-reptile strategy that if we use this tool, taobao website will send the context.

淘宝爬虫效果

xia

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值