Skip to content

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

Fixes issue when there are no matches (won't be None but an empty list).

Steve Micallef4169181e211b
diff --git a/modules/sfp_slideshare.py b/modules/sfp_slideshare.py
index d4e5d8a3..6956d12a 100644
--- a/modules/sfp_slideshare.py
+++ b/modules/sfp_slideshare.py
@@ -73,7 +73,7 @@ class sfp_slideshare(SpiderFootPlugin):
# Check if the profile is valid and extract name
human_name = self.extractMeta('slideshare:name', res['content'])
- if human_name is None:
+ if not human_name:
self.sf.debug(name + " is not a valid SlideShare profile")
return None
@@ -83,7 +83,7 @@ class sfp_slideshare(SpiderFootPlugin):
# Retrieve location (country)
location = self.extractMeta('slideshare:location', res['content'])
- if location is None:
+ if not location:
return None
if len(location[0]) < 3 or len(location[0]) > 100:
diff --git a/modules/sfp_twitter.py b/modules/sfp_twitter.py
index ce060758..d6f2e222 100644
--- a/modules/sfp_twitter.py
+++ b/modules/sfp_twitter.py
@@ -73,14 +73,14 @@ class sfp_twitter(SpiderFootPlugin):
# Retrieve name
human_name = re.findall(r'<div class="fullname">([^<]+)\s*</div>', res['content'], re.MULTILINE)
- if human_name is not None:
+ if human_name:
e = SpiderFootEvent("RAW_RIR_DATA", "Possible full name: " + human_name[0], self.__name__, event)
self.notifyListeners(e)
# Retrieve location
location = re.findall(r'<div class="location">([^<]+)</div>', res['content'])
- if location is not None:
+ if location:
if len(location[0]) < 3 or len(location[0]) > 100:
self.sf.debug("Skipping likely invalid location.")
else: