Merged
Conversation
The classes used for price should be `.YMlIz.FpEdX` but there's a trailing `e` that causes the query to fail.
Update core.py price class
Owner
|
🔥🔥🔥 thanks a lot |
jimmyliu03
pushed a commit
to jimmyliu03/google-flights
that referenced
this pull request
Dec 3, 2025
Update core.py price class
LachyGroom
added a commit
to LachyGroom/flights
that referenced
this pull request
Feb 15, 2026
The HTML parser relies on specific CSS class names (e.g. tPgKwe, mv1WYe, Ak5kof, BbR8Ec) to extract flight details. However, Google obfuscates these class names differently depending on the browser/TLS fingerprint. Since primp's chrome_126 impersonation silently falls back to a random fingerprint, ~25% of requests receive HTML with different class names, causing airline name, departure/arrival times, duration, and stops to all come back empty while price still works. This adds a fallback that parses the aria-label attribute on each flight item when any CSS selector returns empty data. The aria-label always contains structured text regardless of fingerprint, e.g.: "From 2359 US dollars. Nonstop flight with Alaska. Leaves San Jose Mineta International Airport at 2:25 PM on Sunday, February 15 ..." Also handles U+202F (narrow no-break space) that Google uses between time digits and AM/PM in aria-labels. Relates to AWeirdDev#7 (same class of bug for price CSS selector) and AWeirdDev#63 (duplicate flights from multiple container elements). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The classes used for price should be
.YMlIz.FpEdX. There's a trailingethat causes the query to always return 0.