From c4b2d0a23b74109ec4241831e8d259ee74db79ef Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Sun, 19 Nov 2023 13:19:32 +0100 Subject: [PATCH] Enhanced matching of HTML title w.r.t custom alias in TT --- src/solo_turnier/html_parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/solo_turnier/html_parser.py b/src/solo_turnier/html_parser.py index 45b3f32..9eb97f4 100644 --- a/src/solo_turnier/html_parser.py +++ b/src/solo_turnier/html_parser.py @@ -34,8 +34,9 @@ class HtmlParser: if title is None: title = self.getEventTitle() - match = re.compile('.*?ETW, Solos (.*)').match(title) + match = re.compile('.*?ETW, Solos (.*?)(?: ".*")?').fullmatch(title) if match is None: + self.l.error('Cannot parse html title "%s". Possible bug?', title) raise Exception(f'Cannot parse title "{title}"') rest = match.group(1)