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__":