-
Notifications
You must be signed in to change notification settings - Fork 128
Description
Missing Self-Transfer / Separate-Ticket Flights
Note: This issue is related to but distinct from #65 (Cheapest flight third-party booking). That issue focuses on booking links/options, while this issue addresses the complete absence of self-transfer flights from results.
Problem Description
The fast-flights library does not return self-transfer flight combinations ("Eigener Transfer" in German UI). These are often the cheapest options available, especially on routes without direct or codeshare connections.
Evidence
Test Case: Casablanca (CMN) → Dubai (DXB), Sat Feb 14, 2026, 1 adult, economy
| Flight | Google Flights (manual) | fast-flights scraper |
|---|---|---|
| Royal Air Maroc / AJet (self-transfer via MAD, ESB) | €311 | ❌ Not found |
| Transavia / AJet (self-transfer via AMS, ESB) | €319 | ❌ Not found |
| Royal Air Maroc / Ryanair / Etihad (self-transfer via FCO, PFO, AMM) | €326 | ❌ Not found |
| TUI fly / Transavia / Air Arabia (self-transfer via ORY, BEY) | €361 | ❌ Not found |
| Gulf Air (1 stop, BAH) | €740 | €805 (price discrepancy) |
Result: The scraper returned a cheapest price of €805, while Google Flights showed options from €311 — a 61% price difference.
Impact
- Budget routes that combine separate airlines (self-transfer) are completely invisible to the scraper
- These are often the cheapest options, especially on routes without direct or codeshare connections (e.g., Africa → Middle East/Asia)
- Secondary issue: even for flights the scraper does find, prices can differ from what Google Flights shows in the browser
What Are Self-Transfer Flights?
Google Flights combines separate tickets from different airlines into a single itinerary. These show up with:
- "Eigener Transfer" / "Self transfer" label
- A warning icon (triangle) in the UI
- The passenger is responsible for collecting and re-checking baggage between flights
- Each leg is a separate booking — if one leg is delayed/cancelled, the other airline has no obligation
Technical Analysis
After analyzing the library source code, I found:
1. Missing Data Structure Fields
The Flight dataclass in schema.py has no field for self-transfer status:
@dataclass
class Flight:
is_best: bool
name: str
departure: str
arrival: str
arrival_time_ahead: str
duration: str
stops: int
delay: Optional[str]
price: str
# ❌ Missing: is_self_transfer, transfer_warning, etc.2. Limited CSS Selectors
The parsing logic in core.py only targets specific containers:
for i, fl in enumerate(parser.css('div[jsname="IWWDBc"], div[jsname="YdtKid"]')):
# Only parses flights in these specific containersIf Google Flights renders self-transfer flights in different containers or with different jsname attributes, they will be completely missed.
3. No Self-Transfer Detection Logic
- Zero mentions of "self-transfer", "separate ticket", or "Eigener Transfer" in the codebase
- No logic to detect warning icons or labels
- No extraction of transfer responsibility information
Root Cause Hypothesis
- Different DOM Structure: Self-transfer flights are likely rendered in different DOM containers with different CSS classes/attributes
- Filtering: Google Flights may filter self-transfer flights into a separate section or tab that the scraper doesn't access
- API Parameters: The library uses specific URL parameters (
tfs,hl,tfu,curr) that may exclude self-transfer results by default - Hardcoded Selectors: The CSS selectors are hardcoded and may only match standard flight results
Additional Issue: Price Discrepancy
Even for flights the scraper does find, there are price discrepancies:
- Gulf Air flight: €740 (manual) vs €805 (scraper)
- Possible causes: currency/locale differences, timing issues, or parsing errors
Proposed Solutions
- Expand CSS Selectors: Inspect Google Flights HTML to find CSS selectors for self-transfer flights and add them to the parser
- Add Self-Transfer Detection:
- Add
is_self_transferfield toFlightschema - Extract warning labels/icons
- Parse transfer responsibility information
- Add
- API Parameter Investigation: Test if different URL parameters or filters can force self-transfer results to appear
- Alternative Approaches: Consider using Google Flights API parameters that explicitly include self-transfer results
Environment
- Library version: Latest (as of Feb 2026)
- Python version: 3.9+
- Fetch mode tested:
local(Playwright-based)
Reproduction Steps
- Search for flights: CMN → DXB, Feb 14, 2026, 1 adult, economy
- Compare results with manual Google Flights search
- Observe that cheapest self-transfer options (€311-€361) are missing
- Only expensive standard flights (€805+) are returned
Expected Behavior
The library should return all flight options shown by Google Flights, including self-transfer combinations, with appropriate flags/indicators to distinguish them from standard bookings.
Actual Behavior
Self-transfer flights are completely absent from results, leading to significantly higher "cheapest" prices than what Google Flights actually shows.
Note: This issue significantly impacts users searching for budget flights, especially on routes without direct connections. Self-transfer flights are often the most economical option and should be included in results.