fix: 添加错误日志记录以便于调试和问题追踪
This commit is contained in:
parent
f3b2102d62
commit
32a15d27ce
@ -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))
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user