我平时写后台的,看你们爬得高兴也来凑个热闹。 做得很粗糙,没有考虑出错恢复什么的,有时间再加吧。 地址是 https://github.com/carlonelong/TaobaoMMCrawler
1 aksoft 2017-03-31 13:30:15 +08:00 这是抓啥的??? |
2 carlonelong OP @aksoft mm 相册 |
![]() | 3 RE 2017-03-31 14:20:17 +08:00 原来是抓淘女郎…… 话说抓过某特定关键词的买家秀,惊喜多多… 楼主可以试试… 记住分类排除内衣的(不让上图 |
![]() | 4 @RE 这个刺激了 |
5 mansur 2017-03-31 14:25:19 +08:00 能抓东京的大姐姐吗 |
![]() | 6 springmarker 2017-03-31 14:35:54 +08:00 via Android 抓 cosplay 店的 |
7 carlonelong OP @RE 来提供一个~~ |
8 carlonelong OP @springmarker 有道理 |
![]() | 9 tyhunter 2017-03-31 15:33:24 +08:00 报错了 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' |
10 carlonelong OP @tyhunter 编码出问题了。。 你是啥环境啊 |
![]() | 1 roist 2017-03-31 17:01:25 +08:00 美图秀秀修过度的图,不如看看那些国内的擦边套图 |
12 zwh8800 2017-03-31 17:12:37 +08:00 好像有 BUG 啊 ``` $ python crawler.py start downloading 田媛媛 current page 1 start downloading album 10000702574 45 张 Traceback (most recent call last): File "crawler.py", line 83, in <module> c.getAlbums() File "crawler.py", line 58, in getAlbums self.getImages(model_id, album_id, album_img_count.strip(u'张')) File "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' ``` |
![]() | 13 123s 2017-03-31 17:18:34 +08:00 抓淘宝 MM 好 h |
![]() | 14 xiejc 2017-03-31 17:24:44 +08:00 41 行 soup = bs(self.readHtml(model_url).decode('gbk'), 'html.parser') 修改成功 不报错了 |
15 carlonelong OP @xiejc 好 thx 我改一下 |
![]() | 16 imherer 2017-03-31 17:29:31 +08:00 Python 版本要多少啊? 我 2.7 在 Mac 和 Windows 下都报同样的错呢 ```` Traceback (most recent call last): File "TaobaoMMCrawler.py", line 5, in <module> from bs4 import BeautifulSoup as bs ImportError: No module named bs4 ```` |
18 carlonelong OP @imherer 这个是因为你没装 beautifulsoup pip install bs4 应该就可以了 |
![]() | 19 7654 2017-03-31 17:52:22 +08:00 可以添加浏览器 UA 爬的时候限制一下,不然会 GG |
20 neutrino 2017-03-31 17:58:07 +08:00 提了个 pr ,有些文件是 png 格式的( |
![]() | 21 imherer 2017-03-31 18:01:27 +08:00 @carlonelong 多谢 |
22 carlonelong OP @neutrino thx 另外吐个槽,很不喜欢 python3 的 print = = |
23 carlonelong OP @7654 嗯,回头改一下 |
![]() | 24 7654 2017-03-31 18:28:16 +08:00 r#22 @carlonelong import urllib.request |
25 neutrino 2017-03-31 18:51:34 +08:00 @carlonelong haha 我是懒得装两份 bs4 requests ……就不说刚开始用 print 的时候是按照 printf 的格式用的了……捂脸 |
![]() | 26 7654 2017-03-31 18:59:48 +08:00 去掉_620x10000.jpg 是大图 |
27 carlonelong OP @7654 我去 我居然没有发现 |
28 neutrino 2017-03-31 22:32:07 +08:00 |
29 aksoft 2017-04-01 04:28:33 +08:00 via iPhone 不能抓回家不好 |
30 carlonelong OP @aksoft 3D 打印 你值得拥有 |
31 carlonelong OP @neutrino 我今天晚上把俩文件合一块吧 |
32 aksoft 2017-04-01 11:15:33 +08:00 @carlonelong 不能用 有啥用? |
33 carlonelong OP 把 py2/3 放在一起了 |