fix: Route FRA→HAN (Hanoi), Kabine Premium Economy
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
bf1d0eb071
commit
7cd39d0387
2 changed files with 8 additions and 6 deletions
|
|
@ -119,10 +119,10 @@ TREND: [STEIGEND / FALLEND / STABIL]'
|
|||
('flugscanner-mu', '100.75.182.15', 'Muldenstein DE')
|
||||
""")
|
||||
|
||||
# Standard-Job
|
||||
# Standard-Job: Frankfurt → Hanoi, Premium Economy
|
||||
c.execute("""
|
||||
INSERT OR IGNORE INTO jobs (scanner, von, nach, tage, intervall) VALUES
|
||||
('google_flights', 'FRA', 'PNH', 30, 'daily')
|
||||
('google_flights', 'FRA', 'HAN', 30, 'daily')
|
||||
""")
|
||||
|
||||
conn.commit()
|
||||
|
|
|
|||
|
|
@ -51,11 +51,11 @@ def parse_preise_aus_text(text, scanner, abflug):
|
|||
|
||||
def scrape_google_flights(von, nach, tage=30):
|
||||
abflug = (datetime.now() + timedelta(days=tage)).strftime("%Y-%m-%d")
|
||||
# Direkte Google Flights Such-URL
|
||||
# Direkte Google Flights Such-URL — sc:w = Premium Economy
|
||||
url = (
|
||||
f"https://www.google.com/travel/flights/search"
|
||||
f"?hl=de&curr=EUR"
|
||||
f"#flt={von}.{nach}.{abflug};c:EUR;e:1;sd:1;t:f"
|
||||
f"#flt={von}.{nach}.{abflug};c:EUR;e:1;sd:1;t:f;sc:w"
|
||||
)
|
||||
|
||||
with SB(uc=True, headless=True, chromium_arg="--no-sandbox --disable-dev-shm-usage") as sb:
|
||||
|
|
@ -187,7 +187,8 @@ def _parse_single(text):
|
|||
|
||||
def scrape_kayak(von, nach, tage=30):
|
||||
abflug = (datetime.now() + timedelta(days=tage)).strftime("%Y-%m-%d")
|
||||
url = f"https://www.kayak.de/flights/{von}-{nach}/{abflug}?sort=price_a¤cy=EUR"
|
||||
# ~prem~ = Premium Economy bei Kayak
|
||||
url = f"https://www.kayak.de/flights/{von}-{nach}/{abflug}?sort=price_a¤cy=EUR&cabin=w"
|
||||
results = []
|
||||
|
||||
with SB(uc=True, headless=True, chromium_arg="--no-sandbox --disable-dev-shm-usage") as sb:
|
||||
|
|
@ -229,7 +230,8 @@ def scrape_kayak(von, nach, tage=30):
|
|||
def scrape_skyscanner(von, nach, tage=30):
|
||||
abflug_fmt = (datetime.now() + timedelta(days=tage)).strftime("%y%m%d")
|
||||
abflug_iso = (datetime.now() + timedelta(days=tage)).strftime("%Y-%m-%d")
|
||||
url = f"https://www.skyscanner.de/transport/flights/{von.lower()}/{nach.lower()}/{abflug_fmt}/?currency=EUR"
|
||||
# /w/ = Premium Economy bei Skyscanner
|
||||
url = f"https://www.skyscanner.de/transport/flights/{von.lower()}/{nach.lower()}/{abflug_fmt}/?currency=EUR&cabinclass=premiumeconomy"
|
||||
results = []
|
||||
|
||||
with SB(uc=True, headless=True, chromium_arg="--no-sandbox --disable-dev-shm-usage") as sb:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue