From f0e499f0a3169b3199965ff88be11139fb4a81c5 Mon Sep 17 00:00:00 2001 From: Stefan Harmuth Date: Fri, 15 Dec 2023 07:34:38 +0100 Subject: [PATCH] escape patterns want to be raw strings --- src/tools/aoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/aoc.py b/src/tools/aoc.py index e1f08fb..e4e1224 100644 --- a/src/tools/aoc.py +++ b/src/tools/aoc.py @@ -163,7 +163,7 @@ class AOCDay: message = soup.article.text if "That's the right answer" in message: answer_cache[str_day][str_part]["correct"] = answer - has_rank = re.findall("You achieved.*rank (\d+)", message) + has_rank = re.findall(r"You achieved.*rank (\d+)", message) print("That's correct!%s" % f" (Rank {has_rank[0]})" if has_rank else "") webbrowser.open( "https://adventofcode.com/%d/day/%d#part2" % (self.year, self.day)