Incredibly fast crawler designed for OSINT.
fixed broken link checking
Somdev Sangwana614ca2d1a5b
diff --git a/photon.py b/photon.pyindex 6c6b64c..b48d32f 100644--- a/photon.py+++ b/photon.py@@ -11,7 +11,7 @@ import urllib3import argparseimport threadingfrom re import search, findall-from requests import get, post, codes+from requests import get, posttry:from urllib.parse import urlparse # for python3except ImportError:@@ -170,19 +170,18 @@ def requester(url):response = random.choice([photopea, normal, pixlr, code_beautify])(url)#check if link is not broken- if response.status_code == codes.ok:- return response.text # return response body- else:+ if response.status_code == '404':failed.add(url) # add it to the failed list+ return response.text # return response body+else:response = normal(url)#check if link is not broken- if response.status_code == codes.ok:- return response.text # return response body- else:+ if response.status_code == '404':failed.add(url) # add it to the failed list+ return response.text # return response bodyexcept: # if photon fails to connect to the urlfailed.add(url) # add it to the failed list