From bb9830887a51b5deaa3ff8b202c9b900050efc2d Mon Sep 17 00:00:00 2001 From: Franklin-F Date: Fri, 27 Jun 2025 18:45:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=BB=A5=E9=AA=8C=E8=AF=81DailymotionClient?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=B9=B6=E8=AE=B0=E5=BD=95=E6=88=AA=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- report_video.py | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/report_video.py b/report_video.py index 8314e42..72b3a9a 100644 --- a/report_video.py +++ b/report_video.py @@ -319,20 +319,34 @@ class DailymotionClient: # 倄理 Solved ηŠΆζ€ return 2,"" + @require_login + def test(self): + logger.info(f"Testing DailymotionClient with email: {self.email}") + self.page.goto(self.url, timeout=30000) + file_path = f'screenshots/{str(int(time.time()))}_test.png' + self.page.screenshot(path=file_path) + self.page.wait_for_timeout(1000) + file_path = f"screenshots/{str(int(time.time()))}_test2.png" + self.page.screenshot(path=file_path) + logger.info(f"Test screenshot saved to {file_path}") + self.page.wait_for_timeout(1000) + file_path = f"screenshots/{str(int(time.time()))}_test3.png" + self.page.screenshot(path=file_path) + logger.info(f"Test screenshot saved to {file_path}") -def close(self): - try: - self.page.close() - except Exception: - pass - try: - self.browser.close() - except Exception: - pass - try: - self._pw.stop() - except Exception: - pass + def close(self): + try: + self.page.close() + except Exception: + pass + try: + self.browser.close() + except Exception: + pass + try: + self._pw.stop() + except Exception: + pass if __name__ == "__main__":