33 lines
917 B
Python
33 lines
917 B
Python
#!/usr/bin/env python3
|
|
"""One-time interactive Airbnb login to save session state.
|
|
|
|
Run on a machine with a display (Mac recommended). Re-run when Airbnb
|
|
sessions expire or calendar automation hits login/auth errors.
|
|
|
|
Default (Chromium):
|
|
|
|
python scripts/airbnb_login.py
|
|
|
|
Optional stealth Firefox (if Airbnb blocks Chromium — same mode for login + runs):
|
|
|
|
pip install 'git+https://github.com/feder-cr/invisible_playwright.git'
|
|
python -m invisible_playwright fetch
|
|
AIRBNB_STEALTH=1 python scripts/airbnb_login.py
|
|
|
|
Then copy to automationlab:
|
|
|
|
scp state.json root@10.0.10.45:/opt/atanyrate/state.json
|
|
"""
|
|
|
|
from pathlib import Path
|
|
import sys
|
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
|
|
|
from src.airbnb.auth import interactive_login
|
|
|
|
if __name__ == "__main__":
|
|
print("Starting Airbnb login helper...")
|
|
interactive_login()
|
|
print("Done. Session saved to state.json")
|