from playwright.sync_api import sync_playwright, expect, Page, BrowserContext from playwright_stealth import stealth_sync from pyvirtualdisplay.smartdisplay import SmartDisplay from actions.cards import daily_cards, more_cards, all_cards from actions.login import login from actions.websearch import pc_search from tools.browser_config import create_display, start_browser from tools.config import load_parameters, check_config from tools.logger import * import sys import json def routine(mail: str, pwd: str, vnc: bool = False) -> None: name = mail.split("@")[0] # display = create_display(vnc) # display.start() page, browser = start_browser(name) login(page, mail, pwd) all_cards(page) pc_search(page) # display.stop() browser.close() def main(): data = load_parameters() check_config(data) # routine("EMAIL", "PWD", True) # parse_file({"accounts": {"nb": 1, 0: {"mail": "piair338@gmail.com", "pwd": ""}}}) """ TODO : Fidelity management. Daily search mobile start -> with json config -> allow claiming -> default mode --vnc-- Should work, but not tested with WSL. remove unused imports """