diff --git a/src/agenda_culturel/import_tasks/custom_extractors/fbevents.py b/src/agenda_culturel/import_tasks/custom_extractors/fbevents.py index bf02a96..d6be501 100644 --- a/src/agenda_culturel/import_tasks/custom_extractors/fbevents.py +++ b/src/agenda_culturel/import_tasks/custom_extractors/fbevents.py @@ -19,6 +19,8 @@ class CExtractor(TwoStepsExtractor): def build_event_url_list(self, content): soup = BeautifulSoup(content, "html.parser") + debug = False + found = False links = soup.find_all("a") for link in links: @@ -26,7 +28,7 @@ class CExtractor(TwoStepsExtractor): self.add_event_url(link.get('href').split('?')[0]) found = True - if not found: + if not found and debug: directory = "errors/" if not os.path.exists(directory): os.makedirs(directory)