Skip to content

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

Handle empty content from commoncrawl gracefully.

Steve Micalleff86620ee80b7
diff --git a/modules/sfp_commoncrawl.py b/modules/sfp_commoncrawl.py
index 1adc71d6..11596111 100644
--- a/modules/sfp_commoncrawl.py
+++ b/modules/sfp_commoncrawl.py
@@ -71,6 +71,11 @@ class sfp_commoncrawl(SpiderFootPlugin):
self.errorState = True
return None
+ if not res['content']:
+ self.sf.error("CommonCrawl index collection doesn't seem to be available.", False)
+ self.errorState = True
+ return None
+
indexes = re.findall(".*(CC-MAIN-\d+-\d+).*", res['content'])
highest = 0
indexlist = dict()