fix issue with two runs of anitbot extractor

pull/341/head
msramalho 2025-07-05 16:00:03 +01:00
rodzic 0d1447117c
commit eae0da08b3
Nie znaleziono w bazie danych klucza dla tego podpisu
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -81,6 +81,9 @@ class AntibotExtractorEnricher(Extractor, Enricher):
os.makedirs(self.user_data_dir, exist_ok=True)
def enrich(self, to_enrich: Metadata, custom_data_dir: bool = True) -> bool:
if to_enrich.get_media_by_id("html_source_code"):
logger.info("Antibot has already been executed, skipping.")
return True
using_user_data_dir = self.user_data_dir if custom_data_dir else None
url = to_enrich.get_url()