fix: [crawler] fix capture None domain name

This commit is contained in:
terrtia 2024-02-02 14:48:19 +01:00
parent a7fd838329
commit b6eb6c9016
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -230,7 +230,12 @@ class Crawler(AbstractModule):
domain = task.get_domain() domain = task.get_domain()
print(domain) print(domain)
if not domain: if not domain:
raise Exception(f'Error: domain {domain}') if self.debug:
raise Exception(f'Error: domain {domain} - task {task.uuid} - capture {capture.uuid}')
else:
self.logger.critical(f'Error: domain {domain} - task {task.uuid} - capture {capture.uuid}')
print(f'Error: domain {domain}')
return None
self.domain = Domain(domain) self.domain = Domain(domain)
self.original_domain = Domain(domain) self.original_domain = Domain(domain)