Patchright (not Playwright) for PP login — clears Cloudflare#9
Merged
Conversation
Stock Playwright fails Cloudflare's bot fingerprint check on pointspath.com
because of three signals it can't hide:
- navigator.webdriver=true (W3C-mandated for Playwright)
- CDP Runtime.enable leak (anti-bot scripts watch for this specifically)
- Playwright's bundled Chromium JA3/JA4 TLS fingerprint doesn't match
any real Chrome release
Patchright is a drop-in Playwright fork that patches the first two at the
source level. Using channel="chrome" makes us launch the real Chrome
binary, fixing the third.
The login now uses launch_persistent_context with a profile dir at
~/.cache/flight-cli/browser-profile/ so cf_clearance cookies persist
across runs — the user only has to clear the human-check once.
Optional install extra renamed: browser-login now requires patchright>=1.59
instead of playwright>=1.40. README + login command help text updated to
point at `uv run --with patchright` and `patchright install chrome`.
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.
Summary
flight auth pp login's headed-browser path stopped working: pointspath.com sits behind Cloudflare, and stock Playwright trips three detection signals it can't hide (navigator.webdriver, CDPRuntime.enableleak, JA3 TLS fingerprint).Swap to Patchright — a drop-in Playwright fork that patches the CDP leak and
navigator.webdriverat the source level. Launch withchannel="chrome"to use the real Chrome binary (whose TLS fingerprint matches real traffic) pluslaunch_persistent_context(user_data_dir=…)socf_clearancecookies persist between runs.Verified the choice via pplx + WebSearch — Patchright is the actively-maintained 2026 consensus pick for Cloudflare-resistant Playwright work, and confirmed Patchright Python exists on PyPI tracking upstream 1.59.x.
Changes
src/flight_cli/pp/auth.py:login_via_browserswitched fromplaywright.sync_api→patchright.sync_api. Useslaunch_persistent_contextwith a profile under~/.cache/flight-cli/browser-profile/,channel="chrome",headless=False.pyproject.toml:browser-loginextra renamedplaywright>=1.40→patchright>=1.59; same for dev deps.README.md+pp_loginhelp text: install instructions point atuv run --with patchright+ one-timeuvx --from patchright patchright install chrome.Test plan
make checkgreen: 115 passing.uvx --from patchright patchright install chrome(one-time).uv run --with patchright flight auth pp login— verify Cloudflare's human-check resolves (one click), PP login completes,flight auth pp whoamiconfirms.flight auth pp loginafter the first success —cf_clearanceshould already be in the persisted profile, so the human-check shouldn't reappear.Sources