ppf: print url if fetching failed
This commit is contained in:
4
ppf.py
4
ppf.py
@@ -43,7 +43,9 @@ def fetch_contents(url):
|
||||
]
|
||||
proxies = [rocksock.RocksockProxyFromURL('socks4://%s' % random.choice( config.torhosts ))]
|
||||
http = RsHttp(host,ssl=ssl,port=port, keep_alive=True, timeout=15, max_tries=1, follow_redirects=True, auto_set_cookies=True, proxies=proxies, user_agent='Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0')
|
||||
if not http.connect(): return ''
|
||||
if not http.connect():
|
||||
_log("failed to connect to %s"%url, "ppf")
|
||||
return ''
|
||||
hdr, res = http.get(uri, headers)
|
||||
res = res.encode('utf-8') if isinstance(res, unicode) else res
|
||||
for retry_message in retry_messages:
|
||||
|
||||
Reference in New Issue
Block a user