only scan webpages
This commit is contained in:
@@ -77,8 +77,9 @@ def stable_request(url, headers):
|
|||||||
verify=False,
|
verify=False,
|
||||||
timeout=10,
|
timeout=10,
|
||||||
allow_redirects=redirects_allowed)
|
allow_redirects=redirects_allowed)
|
||||||
if not response.headers.get('Content-Type', '').startswith('text/'):
|
content = response.headers.get('Content-Type', '')
|
||||||
print('%s URL doesn\'t seem to be a webpage. Skipping.' % info)
|
if not ('text' in content or 'html' in content or 'json' in content or 'xml' in content):
|
||||||
|
print('%s URL doesn\t seem to be a webpage. Skipping.' % info)
|
||||||
return None
|
return None
|
||||||
return response.url
|
return response.url
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user