From 40bd29581ecf174e34bed8ad02cc01815c94a4f3 Mon Sep 17 00:00:00 2001 From: CHUN YU YAO Date: Sun, 5 Mar 2023 12:32:37 +0800 Subject: [PATCH] fix for galaxy macau too busy issue. --- chrome_tixcraft.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chrome_tixcraft.py b/chrome_tixcraft.py index 8c6ba5d..3e9fe6d 100644 --- a/chrome_tixcraft.py +++ b/chrome_tixcraft.py @@ -7195,9 +7195,15 @@ def hkticketing_main(driver, url, config_dict, hkticketing_dict): hkticketing_go_to_payment(driver) # for ticketing.galaxymacau - if "/busy_galaxy.html" in url: + if "/busy_galaxy.htm" in url: domain_name = url.split('/')[2] new_url = "https://%s/default.aspx" % (domain_name) + print("redirecting to url:", new_url) + try: + # web server is too busy to reponse. + driver.execute_script("retryIn=0;document.location.href = \"/default.aspx\";") + except Exception as exc: + pass driver.get(new_url) return hkticketing_dict