MsRewards/V7/V7.py

33 lines
840 B
Python
Raw Normal View History

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.config import create_display, start_browser
from tools.logger import *
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()
routine("EMAIL", "PWD", True)
"""
TODO :
Fidelity management.
Daily search mobile
custom start
--vnc-- Should work, but not tested with WSL.
"""