creación de scheduler.json para ejecución de servicio

This commit is contained in:
George committed 2026-08-04 09:34:44 -05:00
1 parent 839aad698d
commit 1c39f6f45f
11 files changed
+112 -400

No files matched your search

+5 -4
View File
@@ -10,14 +10,14 @@ from get_token import (
fill_login_form, save_token, save_screenshot,
check_for_token, navigate_sol_menu, extract_token_from_menu,
)
# ============================================================================
USER_AGENT = (
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/120.0.0.0 Safari/537.36"
)
# ============================================================================
def chrome_instalado():
sistema = platform.system().lower()
if sistema == "windows":
@@ -33,7 +33,7 @@ def chrome_instalado():
return bool(shutil.which("google-chrome") or shutil.which("google-chrome-stable"))
return False
# ============================================================================
def get_token_headless(timeout=90000):
with sync_playwright() as p:
browser = p.chromium.launch(
@@ -94,6 +94,7 @@ def get_token_headless(timeout=90000):
print(" ❌ No se encontró token")
return None
# ============================================================================
if __name__ == "__main__":
get_token_headless()
# ============================================================================