Enhanced matching of HTML title w.r.t custom alias in TT

This commit is contained in:
Christian Wolf 2023-11-19 13:19:32 +01:00
parent f075e1e167
commit c4b2d0a23b

View File

@ -34,8 +34,9 @@ class HtmlParser:
if title is None: if title is None:
title = self.getEventTitle() title = self.getEventTitle()
match = re.compile('.*?ETW, Solos (.*)').match(title) match = re.compile('.*?ETW, Solos (.*?)(?: ".*")?').fullmatch(title)
if match is None: if match is None:
self.l.error('Cannot parse html title "%s". Possible bug?', title)
raise Exception(f'Cannot parse title "{title}"') raise Exception(f'Cannot parse title "{title}"')
rest = match.group(1) rest = match.group(1)