From bc213d82b21f82b16f2dfae301849d5c08bacd4e Mon Sep 17 00:00:00 2001 From: JabLuszko Date: Fri, 20 Sep 2024 11:32:51 +0200 Subject: [PATCH] Update screenPath.py (#1385) --- mapadroid/ocr/screenPath.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mapadroid/ocr/screenPath.py b/mapadroid/ocr/screenPath.py index e70146214..787b20909 100644 --- a/mapadroid/ocr/screenPath.py +++ b/mapadroid/ocr/screenPath.py @@ -465,6 +465,10 @@ async def __handle_ptc_login(self) -> ScreenType: exit_keyboard_y: int = 300 for item in xmlroot.iter('node'): + if "android.widget.ProgressBar" in item.attrib["class"]: + logger.warning("PTC page still loading, sleeping for extra 12 seconds") + await asyncio.sleep(12) + return ScreenType.PTC if "Access denied" in item.attrib["text"]: logger.warning("WAF on PTC login attempt detected") # Reload the page 1-3 times