From eae0da08b3ca42d7fecbcf26a4d25ae12479558f Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Sat, 5 Jul 2025 16:00:03 +0100 Subject: [PATCH] fix issue with two runs of anitbot extractor --- .../antibot_extractor_enricher/antibot_extractor_enricher.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/auto_archiver/modules/antibot_extractor_enricher/antibot_extractor_enricher.py b/src/auto_archiver/modules/antibot_extractor_enricher/antibot_extractor_enricher.py index 8d5d019..5e61bad 100644 --- a/src/auto_archiver/modules/antibot_extractor_enricher/antibot_extractor_enricher.py +++ b/src/auto_archiver/modules/antibot_extractor_enricher/antibot_extractor_enricher.py @@ -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()