From c96fd71f35a692890585ed3e84cfc1582403070d Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Sat, 7 Jun 2025 20:06:53 +0100 Subject: [PATCH] minor cleanup --- .../antibot_extractor_enricher.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 c8dc137..e82a2f8 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 @@ -39,8 +39,7 @@ class AntibotExtractorEnricher(Extractor, Enricher): else: self.max_download_videos = int(self.max_download_videos) - os.makedirs(self.user_data_dir, exist_ok=True) - self._warn_about_docker_and_user_data_dir() + self._prepare_and_warn_about_docker_and_user_data_dir() self.dropins = self.load_dropins() @@ -78,7 +77,9 @@ class AntibotExtractorEnricher(Extractor, Enricher): result.status = "antibot" return result - def _warn_about_docker_and_user_data_dir(self): + def _prepare_and_warn_about_docker_and_user_data_dir(self): + os.makedirs(self.user_data_dir, exist_ok=True) + in_docker = os.environ.get("RUNNING_IN_DOCKER") if in_docker and self.user_data_dir: st = os.stat(self.user_data_dir)