ppf: add optional debug output

This commit is contained in:
rofl0r
2019-01-11 05:03:40 +00:00
parent b6dba08cf0
commit d2cb7441a8
2 changed files with 3 additions and 0 deletions

2
ppf.py
View File

@@ -51,6 +51,8 @@ def fetch_contents(url):
'Accept-Language: en-US,en;q=0.8',
'Cache-Control: max-age=0',
]
if config.ppf.debug:
_log("connecting to %s..."%url, "debug")
while True:
proxies = [rocksock.RocksockProxyFromURL('socks4://%s' % random.choice( config.torhosts ))]
http = RsHttp(host,ssl=ssl,port=port, keep_alive=True, timeout=config.ppf.timeout, max_tries=config.ppf.http_retries, 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')