clean code
This commit is contained in:
2
ppf.py
2
ppf.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user