fix: 添加错误日志记录以便于调试和问题追踪

This commit is contained in:
晓丰 2025-06-04 21:10:29 +08:00
parent f3b2102d62
commit 32a15d27ce
2 changed files with 2 additions and 1 deletions

View File

@ -19,4 +19,5 @@ while True:
db.update_fight_record_status(li['id'], 2, info)
db.flush()
except Exception as e:
logger.logger.error(f"ID:{li['id']}, e:{e}")
db.update_fight_record_status(li['id'],3,str(e))

View File

@ -152,7 +152,7 @@ class DailymotionClient:
time.sleep(1)
self.page.get_by_role("button", name="Submit").click()
time.sleep(2)
file_path = f'screenshots/{str(int(time.time()))}_{title}_{link}.png'
file_path = f'screenshots/{str(int(time.time()))}_{title}_{link.split("/")[-1]}.png'
self.page.screenshot(path=file_path)
if self.page.url != self.url:
self.page.goto(self.url, timeout=30000)