Add Outlook/Soubory/Clario/Feasibility scripts and reports; ignore Incoming, Outlook downloads & profile
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
"""
|
||||
=======================================================================
|
||||
Název: JustOpenOutlook_v1.0.py
|
||||
Verze: 1.0
|
||||
Datum: 2026-06-03
|
||||
Popis: Otevře Outlook OWA v persistent Chromium profilu vytvořeném
|
||||
skriptem outlook_login_v1.0.py. Žádný login — pouze otevře
|
||||
okno, počká, až uživatel stiskne Enter, a zavře.
|
||||
=======================================================================
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
PROFILE_DIR = BASE_DIR / "outlook_profile"
|
||||
START_URL = "https://outlook.cloud.microsoft/mail/"
|
||||
|
||||
|
||||
def main() -> None:
|
||||
if not PROFILE_DIR.exists():
|
||||
print(f" Profil nenalezen: {PROFILE_DIR}")
|
||||
print(" Nejprve spusť outlook_login_v1.0.py a přihlas se.")
|
||||
return
|
||||
|
||||
with sync_playwright() as p:
|
||||
context = p.chromium.launch_persistent_context(
|
||||
user_data_dir=str(PROFILE_DIR),
|
||||
headless=False,
|
||||
no_viewport=True,
|
||||
args=[
|
||||
"--disable-blink-features=AutomationControlled",
|
||||
"--start-maximized",
|
||||
],
|
||||
)
|
||||
|
||||
page = context.pages[0] if context.pages else context.new_page()
|
||||
page.goto(START_URL)
|
||||
|
||||
print()
|
||||
print("=" * 70)
|
||||
print(" Outlook otevřen. Stiskni Enter pro zavření.")
|
||||
print("=" * 70)
|
||||
input()
|
||||
|
||||
context.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user