AOCDay._submit(): maybe display rank on correct answer?
This commit is contained in:
parent
2de9725adb
commit
1fb4582908
@ -163,7 +163,8 @@ class AOCDay:
|
||||
message = soup.article.text
|
||||
if "That's the right answer" in message:
|
||||
answer_cache[str_day][str_part]["correct"] = answer
|
||||
print("That's correct!")
|
||||
has_rank = re.findall("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)
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user