一键导入
american-airlines
// Check American Airlines AAdvantage balance, elite status, and loyalty points via Patchright. Handles email 2FA with 6-box code entry. Uses persistent browser profiles to skip 2FA on subsequent runs.
// Check American Airlines AAdvantage balance, elite status, and loyalty points via Patchright. Handles email 2FA with 6-box code entry. Uses persistent browser profiles to skip 2FA on subsequent runs.
What to do when a tool fails, an API hits a rate limit, or a site blocks scraping. Maps every primary tool to its best fallback so a single failure doesn't block the search.
Guided trip planning workflow. Asks destination, dates, travelers, class, and flexibility, then runs parallel flight/hotel search with cpp math and booking plan.
Deutsche Bahn train schedules, journey planning, and departures across Germany and into neighboring countries (Austria, Switzerland, Netherlands, France, Belgium). Use for ICE/IC/regional rail planning and airport ground transport (FRA, MUC).
Discover destinations served from any airport via Wikipedia. Sanity-check whether an airline flies a specific route, find regional service that fare tools miss, identify late-split-return airport options.
Query AwardWallet for loyalty program balances, elite status, and transaction history. Use when checking points inventory, airline status, or planning trips on points.
TripAdvisor Content API for hotel ratings, restaurant search, attraction reviews, rankings, and nearby locations. Use when evaluating hotels or researching destinations. 5K calls/month.
| name | american-airlines |
| description | Check American Airlines AAdvantage balance, elite status, and loyalty points via Patchright. Handles email 2FA with 6-box code entry. Uses persistent browser profiles to skip 2FA on subsequent runs. |
| category | loyalty |
| summary | AAdvantage balance and elite status. AwardWallet does not support AA. |
| api_key | None (requires Patchright) |
| docker_image | ghcr.io/borski/aa-miles-check |
Check AAdvantage award miles balance, elite status (Gold/Platinum/Platinum Pro/Executive Platinum), loyalty points, and million miler status. Uses Patchright (undetected Playwright fork) because AA blocks standard browser automation.
Requires Patchright. AA.com blocks vanilla Playwright and agent-browser.
pip install patchright && patchright install chromium
Or use Docker (no local install needed):
docker pull ghcr.io/borski/aa-miles-check:latest
# or build locally:
docker build -t aa-check skills/american-airlines/
Pass credentials via environment variables or flags. If you use a secrets manager (1Password, Vault, etc.), inject them however you normally would.
# Environment variables
AA_USERNAME=your_aa_number AA_PASSWORD=your_password \
python3 scripts/check_balance.py --json
# Flags
python3 scripts/check_balance.py --username YOUR_AA_NUMBER --password YOUR_PASSWORD --json
# Docker
docker run --rm -e AA_USERNAME=your_aa_number -e AA_PASSWORD=your_password aa-check --json
AA requires email verification on first login from a new device. The script waits up to 120 seconds for the code.
You (the agent) do NOT have access to the user's email. AA sends the 2FA code to the account holder's email address. When the script hits 2FA, you MUST ask the user for the 6-digit code. This is not optional. Do not try to read their email. Do not guess. Do not skip. Ask them, wait for the answer, then write it to the code file.
nohup ... &, disown)"2FA REQUIRED" to confirm the code was sentecho "123456" > /tmp/aa-2fa-code.txtUse --profile name to save browser cookies. After the first successful 2FA, subsequent runs with the same profile skip 2FA entirely. Profiles are stored at ~/.aa-browser-profiles/{name}/. Sessions last hours, not days.
# First run: will need 2FA
python3 scripts/check_balance.py --profile user1 --json
# Later runs: same profile, no 2FA
python3 scripts/check_balance.py --profile user1 --json
AA_2FA_COMMAND to a command that blocks until it has the code, then prints it to stdout. The script runs this first before falling back to file polling./tmp/aa-2fa-code.txt every 2 seconds. Write the 6-digit code there.--code 123456 if you already have the code before running.--code-file /path/to/code.txt{
"username": "XXXXXXX",
"status": "completed",
"miles": 123425,
"elite_status": "Platinum Pro",
"loyalty_points": 180,
"name": "John Doe",
"aadvantage_number": "XXXXXXX",
"million_miler": 19328,
"member_since": "Aug 23, 2011"
}
| Field | Description |
|---|---|
miles | Award miles balance (redeemable) |
elite_status | Gold, Platinum, Platinum Pro, or Executive Platinum (null if none) |
loyalty_points | Current year loyalty points (reset March 1) |
million_miler | Lifetime miles toward Million Miler status |
member_since | Account creation date |
.click() nor Playwright .click() produce a trusted pointer event that AA's React app accepts).headless=False is required. AA detects headless browsers even with Patchright. Docker uses xvfb for a virtual display.AA_2FA_COMMAND to automate code retrieval.