clean code

This commit is contained in:
Mickaël Serneels
2019-04-28 02:00:07 +02:00
parent 9a624819d3
commit 0fb706eeae

2
ppf.py
View File

@@ -39,13 +39,11 @@ def is_good_content_type(string):
def proxyleech(proxydb, urldb, url, stale_count, error, retrievals, proxies_added, content_type):
if not content_type: content_type = get_content_type(url)
#if content_type.lower().startswith('text/') or 'atom+xml' in content_type.lower():
if is_good_content_type(content_type):
try: content = fetch.fetch_contents(url)
except KeyboardInterrupt as e: raise e
except: content = ''
else:
print('WRONG CONTENT_TYPE: %s (%s)' % (url, content_type))
content = ''
unique_count, new = fetch.extract_proxies(content, proxydb)