正则匹配元素文本没有加r; traceback.print_exc()改为traceback.format_exc()

This commit is contained in:
2025-10-26 09:27:00 +08:00
parent d6bab518a9
commit 9a5fcc8511

View File

@@ -226,9 +226,9 @@ class SyncOddsjamBetTracker:
# time.sleep(5)
# page.get_by_role("button", name=f"{day}").click()
# time.sleep(5)
page.get_by_role(
"button", name=re.compile("Show (\d+) Results", re.IGNORECASE)
).click()
# page.get_by_role(
# "button", name=re.compile(r"Show (\d+) Results", re.IGNORECASE)
# ).click()
inner_text = page.get_by_text(
re.compile("Showing 1 to 50 of", re.IGNORECASE)
@@ -347,7 +347,7 @@ def pull_data_from_oddsjam_update(ds: str = None):
update_db_order_status(status_file_path=intercept_response_res_save_path)
dingtalk.send_text(f"{ds}: 比赛状态更新完成")
except Exception as e:
error_info = traceback.print_exc()
error_info = traceback.format_exc()
logger.error(error_info)
dingtalk.send_text(error_info)