Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Design change

Krishnasis Mandal8ae82b00180e
diff --git a/modules/sfp_snov.py b/modules/sfp_snov.py
index 802eade2..80cccc49 100644
--- a/modules/sfp_snov.py
+++ b/modules/sfp_snov.py
@@ -77,7 +77,12 @@ class sfp_snov(SpiderFootPlugin):
return None
try:
# Extract access token from response
- accessToken = json.loads(res.get('content')).get('access_token')
+ content = res.get('content')
+ if isinstance(content, str):
+ accessToken = json.loads(content).get('access_token')
+ else:
+ accessToken = res.get('access_token')
+
return str(accessToken)
except Exception:
self.sf.debug("Could not fetch access token")
@@ -110,11 +115,8 @@ class sfp_snov(SpiderFootPlugin):
self.sf.debug("Could not fetch email addresses")
return None
- try:
- return res['content']
- except:
- self.sf.debug("Could not fetch email addresses")
- return None
+ return res.get('content')
+
# Handle events sent to this module