On désactive la sortie d'erreurs

This commit is contained in:
Jean-Marie Favreau 2024-12-07 10:11:36 +01:00
parent b0b828392a
commit e050ce5eda

View File

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