get_tumblr_likes icon indicating copy to clipboard operation
get_tumblr_likes copied to clipboard

大神你好!Mac环境下运行run.py报错

Open miaomiaowuwuwu opened this issue 6 years ago • 3 comments

如下所示,填写ID后,就这样了

#1 get_json main() Please input blog_id:xxxxxxxxxx Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn (self.host, self.port), self.timeout, **extra_kw) File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 83, in create_connection raise err File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 595, in urlopen self._prepare_proxy(conn) File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 816, in _prepare_proxy conn.connect() File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect conn = self._new_conn() File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x10d284a90>: Failed to establish a new connection: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 440, in send timeout=timeout File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.tumblr.com', port=443): Max retries exceeded with url: /v2/blog/xxxxxxxxx.tumblr.com/info?api_key=mqyfWchrSDffLHqst0k9xLCvsI5JaCyTPJG3ZdCLyQJVm0FX2V (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10d284a90>: Failed to establish a new connection: [Errno 61] Connection refused',)))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "run.py", line 13, in get_json_v3.main() File "/Users/maxiaoming/Desktop/get_tumblr_likes-master/get_json_v3.py", line 24, in main resp = requests.get(info_url, proxies=PROXIES) File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 72, in get return request('get', url, params=params, **kwargs) File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 502, in send raise ProxyError(e, request=request) requests.exceptions.ProxyError: HTTPSConnectionPool(host='api.tumblr.com', port=443): Max retries exceeded with url: /v2/blog/xxxxxxxxx.tumblr.com/info?api_key=mqyfWchrSDffLHqst0k9xLCvsI5JaCyTPJG3ZdCLyQJVm0FX2V (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10d284a90>: Failed to establish a new connection: [Errno 61] Connection refused',)))

这是遇到了什么问题呢,小白完全看不懂 求指教,感谢啦~

miaomiaowuwuwu avatar Dec 06 '18 09:12 miaomiaowuwuwu

碰到了相同的错误。难道是tumblr识别是爬虫,断了连接??

elftech avatar Dec 06 '18 12:12 elftech

MAC 环境下没测试过。是不是和SSR的代理有关系。

cyang812 avatar Dec 07 '18 01:12 cyang812

代理问题

bluefo avatar Dec 10 '18 00:12 bluefo