feat: 添加第二个文件路径支持,优化文件上传逻辑和日志记录

This commit is contained in:
晓丰 2025-06-25 21:01:06 +08:00
parent 17a3ba1596
commit 85fce7eadd

View File

@ -258,9 +258,10 @@ class DailymotionClient:
self.page.get_by_role("checkbox", name="By submitting the present form,", exact=False).check()
time.sleep(1)
self.page.set_input_files('input#request-attachments', [
self.file_path
self.file_path,
self.file_path2
])
self.page.wait_for_timeout(5000)
self.page.wait_for_timeout(8000)
self.page.get_by_role("button", name="Submit").click()
time.sleep(2)
file_path = f'screenshots/{str(int(time.time()))}_{title}_{link.split("/")[-1]}.png'