Augment logging a bit

This commit is contained in:
Christian Wolf 2023-11-08 20:45:44 +01:00
parent bb10d5fa06
commit ee63871e1c

View File

@ -60,12 +60,14 @@ class HtmlParser:
if tds[1].contents[0].startswith('Alle Starter weiter genommen.'): if tds[1].contents[0].startswith('Alle Starter weiter genommen.'):
self.l.info('No excluded starters found.') self.l.info('No excluded starters found.')
return return
regex = re.compile('(.*) \\(([0-9]+)\\)') regex = re.compile('(.*) \\(([0-9]+)\\)')
place = tds[0].contents[0] place = tds[0].contents[0]
match = regex.fullmatch(tds[1].contents[0]) match = regex.fullmatch(tds[1].contents[0])
if match is None: if match is None:
self.l.error('Could not match %s to regex search pattern', str(tds))
raise Exception(f'Could not match {tds} to regex search pattern') raise Exception(f'Could not match {tds} to regex search pattern')
name = match.group(1) name = match.group(1)
number = match.group(2) number = match.group(2)