Python中如何编写抓取淘宝MM图片的爬虫程序
我平时写后台的,看你们爬得高兴也来凑个热闹。 做得很粗糙,没有考虑出错恢复什么的,有时间再加吧。 地址是 https://github.com/carlonelong/TaobaoMMCrawler
Python中如何编写抓取淘宝MM图片的爬虫程序
这是抓啥的???
我无法理解你的问题。
mm 相册
原来是抓淘女郎……
话说抓过某特定关键词的买家秀,惊喜多多… 楼主可以试试… 记住分类排除内衣的(不让上图
这个刺激了
能抓东京的大姐姐吗
抓 cosplay 店的
来提供一个~~
有道理
报错了
start downloading 田媛媛
current page 1
start downloading album 10000702574 45ÕÅ 张
Traceback (most recent call last):
File “/Users/hunter/Downloads/TaobaoMMCrawler-master/crawler.py”, line 83, in <module>
c.getAlbums()
File “/Users/hunter/Downloads/TaobaoMMCrawler-master/crawler.py”, line 58, in getAlbums
self.getImages(model_id, album_id, album_img_count.strip(u’张’))
File “/Users/hunter/Downloads/TaobaoMMCrawler-master/crawler.py”, line 65, in getImages
for page in xrange(1, (int(image_count)-1)/16+2):
ValueError: invalid literal for int() with base 10: ‘45\xd5\xc5’
编码出问题了。。 你是啥环境啊
美图秀秀修过度的图,不如看看那些国内的擦边套图
好像有 BUG 啊<br>$ python <a target="_blank" href="http://crawler.py" rel="nofollow noopener">crawler.py</a><br>start downloading 田媛媛<br>current page 1<br>start downloading album 10000702574 45ÕÅ 张<br>Traceback (most recent call last):<br> File "<a target="_blank" href="http://crawler.py" rel="nofollow noopener">crawler.py</a>", line 83, in <module><br> c.getAlbums()<br> File "<a target="_blank" href="http://crawler.py" rel="nofollow noopener">crawler.py</a>", line 58, in getAlbums<br> self.getImages(model_id, album_id, album_img_count.strip(u'张'))<br> File "<a target="_blank" href="http://crawler.py" rel="nofollow noopener">crawler.py</a>", line 65, in getImages<br> for page in xrange(1, (int(image_count)-1)/16+2):<br>ValueError: invalid literal for int() with base 10: '45\xd5\xc5'<br>
抓淘宝 MM
好 h
41 行 soup = bs(self.readHtml(model_url).decode(‘gbk’), ‘html.parser’) 修改成功 不报错了
好 thx 我改一下
Python 版本要多少啊?
我 2.7 在 Mac 和 Windows 下都报同样的错呢<br>Traceback (most recent call last):<br> File "<a target="_blank" href="http://TaobaoMMCrawler.py" rel="nofollow noopener">TaobaoMMCrawler.py</a>", line 5, in <module><br> from bs4 import BeautifulSoup as bs<br>ImportError: No module named bs4<br>
👍
这个是因为你没装 beautifulsoup pip install bs4 应该就可以了
可以添加浏览器 UA
爬的时候限制一下,不然会 GG
提了个 pr ,有些文件是 png 格式的(
多谢
thx 另外吐个槽,很不喜欢 python3 的 print = =
嗯,回头改一下
r#22 import urllib.request
haha 我是懒得装两份 bs4 requests ……就不说刚开始用 print 的时候是按照 printf 的格式用的了……捂脸
去掉_620x10000.jpg 是大图
我去 我居然没有发现
去掉以后, imghdr 有时候无法识别格式了,下载了看是 jpg ……
不能抓回家不好
3D 打印 你值得拥有
不能用 有啥用?
把 py2/3 放在一起了


