Skip to content

Incredibly fast crawler designed for OSINT.

python2 + python3 compatibility

Somdev Sangwan2b466fb93073
diff --git a/photon.py b/photon.py
index 8901222..f2fc8f1 100644
--- a/photon.py
+++ b/photon.py
@@ -11,7 +11,10 @@ import argparse
import threading
from requests import get, post
from re import search, findall
-from urllib.parse import urlparse
+try:
+ from urllib.parse import urlparse # for python3
+except ImportError:
+ from urlparse import urlparse # for python2
colors = True # Output should be colored
machine = sys.platform # Detecting the os of current system