mirror of
https://gitlab.com/cief-data/data-management.git
synced 2026-08-19 04:13:57 +00:00
Debug Headless
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user