dixudx/tumblr-crawler

在mac下无法下载

neoture opened this issue · 7 comments

$ python tumblr-photo-video-ripper.py fishmovie
You are using proxies.
{u'http': u'socks5://67.209.180.11:443', u'https': u'socks5://67.209.180.11:443'}
接着就卡住不动了,shadowsocks用的是全局模式,不知道是不是那里出了问题

试试把代理改为这样的 { "http": "http://127.0.0.1:1080", "https": "https://127.0.0.1:1080" }
另外本机的ss要开启本地代理,允许来自局域网的链接,端口1080

用Proxifier设置了一下,还是不行

参考下这个,
mrdulin/blog#18

非常感谢!终端可以用ss代理了但是还是爬不了代码如下
fishmovie
Traceback (most recent call last):
File "tumblr-photo-video-ripper.py", line 298, in
CrawlerScheduler(sites, proxies=proxies)
File "tumblr-photo-video-ripper.py", line 149, in init
self.scheduling()
File "tumblr-photo-video-ripper.py", line 162, in scheduling
self.download_media(site)
File "tumblr-photo-video-ripper.py", line 165, in download_media
self.download_photos(site)
File "tumblr-photo-video-ripper.py", line 176, in download_photos
self._download_media(site, "photo", START)
File "tumblr-photo-video-ripper.py", line 193, in _download_media
proxies=self.proxies)
File "/Library/Python/2.7/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/Library/Python/2.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/Library/Python/2.7/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))

raise ConnectionError(e, request=request)

requests.exceptions.ConnectionError: HTTPConnectionPool(host='fishmovie.tumblr.com', port=80): Max retries exceeded with url: /api/read?type=photo&num=50&start=0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x109008310>: Failed to establish a new connection: [Errno 61] Connection refused',))

加个头文件,建议博主优化下代码,我自己加了头文件就能避免被反扒了。

@C00LMIN 能帮忙提交一个PR吗