fix: [module_extractor] don't extract onion from crawled items

master
terrtia 2024-12-09 17:25:23 +01:00
parent f4fca05524
commit f77c9268bb
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 3 additions and 0 deletions

View File

@ -56,6 +56,9 @@ class Onion(AbstractModule):
def extract(self, obj, content, tag):
extracted = []
if self.obj.type == 'item':
if 'infoleak:submission="crawler"' in obj.get_tags():
return extracted
onions = self.regex_finditer(self.onion_regex, obj.get_global_id(), content)
for onion in onions:
start, end, value = onion