fix: [module_extractor] don't extract onion from crawled items
Some checks are pending
CI / ail_test (3.9) (push) Waiting to run
CI / ail_test (3.10) (push) Waiting to run
CI / ail_test (3.7) (push) Waiting to run
CI / ail_test (3.8) (push) Waiting to run

This commit is contained in:
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

View file

@ -56,6 +56,9 @@ class Onion(AbstractModule):
def extract(self, obj, content, tag): def extract(self, obj, content, tag):
extracted = [] 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) onions = self.regex_finditer(self.onion_regex, obj.get_global_id(), content)
for onion in onions: for onion in onions:
start, end, value = onion start, end, value = onion