From 5d19b5a5679ac2ced749a03d6fbf2582d9722908 Mon Sep 17 00:00:00 2001 From: Yam ZhengLim Date: Sat, 27 Jan 2024 18:28:09 +0800 Subject: [PATCH] Debug Headless --- c2m/scrape/c2m_scrape_app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/c2m/scrape/c2m_scrape_app.py b/c2m/scrape/c2m_scrape_app.py index 809ddb3..79e3621 100644 --- a/c2m/scrape/c2m_scrape_app.py +++ b/c2m/scrape/c2m_scrape_app.py @@ -8,7 +8,7 @@ import pandas as pd from datetime import datetime -def run(playwright: Playwright, DATA_PATH, ERROR_PATH, CONFIG) -> None: +def run(playwright: Playwright, DATA_PATH, ERROR_PATH, CONFIG, is_headless) -> None: try: dt = datetime.now() date = dt.strftime('%Y-%m-%d') @@ -136,7 +136,7 @@ if __name__ == '__main__': os.makedirs(DATA_PATH, exist_ok=True) with sync_playwright() as playwright: - run(playwright, DATA_PATH, ERROR_PATH, CONFIG) + run(playwright, DATA_PATH, ERROR_PATH, CONFIG, is_headless = False) else: def run_app(C2M_FILES_TEMP_STORAGE_PATH, C2M_CONFIG): @@ -149,4 +149,4 @@ else: os.makedirs(DATA_PATH, exist_ok=True) with sync_playwright() as playwright: - run(playwright, DATA_PATH, ERROR_PATH, C2M_CONFIG) + run(playwright, DATA_PATH, ERROR_PATH, C2M_CONFIG, is_headless = True)