From 81857ffcdca11a0b4c0ea9293c6d1fde3ad6bd41 Mon Sep 17 00:00:00 2001 From: Kataiser Date: Sat, 15 Jul 2023 17:51:15 -0500 Subject: [PATCH] Fixed crash parsing deaths in custom info (again) --- optimizer/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimizer/main.py b/optimizer/main.py index c24e865..227a660 100644 --- a/optimizer/main.py +++ b/optimizer/main.py @@ -285,7 +285,7 @@ def request_force_timeout(url: str): tas_has_finished = "Running: False" in session_data if not tas_has_finished and not init: - deaths_str = session_data.partition('Deaths: ')[2].partition('\n')[0] if 'Deaths: ' in session_data else None + deaths_str = session_data.partition('Deaths: ')[2].partition('<')[0].partition('\n')[0] if 'Deaths: ' in session_data else None deaths = int(deaths_str) if deaths_str else 0 tas_has_finished = deaths > self.target_deaths