Repository navigation
http_scraper.py: the three modes with no browser - #5
Merged
Merged
Conversation
The data endpoints are ungated, so the browser in the three engines is insurance for the day AWS WAF moves in front of them, not a requirement today. This engine drives the same page_flow loop over requests: same flags minus the ones that describe a browser, same output, same exit codes, requests' own User-Agent (§24). Measured 2026-09-30, one 3-page run per mode: identical rows to Playwright in the same order (one copy-trading AUM moved between the runs), P2P 3.0 s vs 5.2 s, copy-trading 3.4 s vs 8.8 s, announcements 2.7 s vs 9.1 s. The shared loop no longer waits for a WAF challenge script when the engine cannot run one (`runs_scripts`): a control showed the wait re-read the empty 202 body without its status and turned a plain block (exit 3) into "never arrived" (exit 5). The suite adds the engine to the operations, binding, masking, import and banned-flag checks, pins its flags as the browser set minus a named list, and drives it through the loop with requests stubbed. The canary runs P2P through it daily with no browser installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Option B from the 2026-09-30 audit ("check whether Chromium is needed on the normal path"). The audit was right: the three data endpoints are ungated, so the browser is insurance for the day AWS WAF moves in front of them, not something the normal path needs. This PR adds a fourth engine that takes the browser away and keeps everything else.
What it is
http_scraper.pyruns the samepage_flowloop overrequests. It produces the same output files, sidecar and exit codes.--headless/--headful,--cdp-endpoint,--fingerprint*,--locale,--twocaptcha-key,--captcha-api,--solve-captcha,--min-score). The suite pins the set both ways, so that list is the documentation.Measured live, 2026-09-30, same VPS, one 3-page run per mode
All six runs were
complete, exit 0, withcore_field_shortfall: {}.A shared-loop change a control found
When landing on a WAF challenge,
land()waited up to 15 s for the challenge script to run. With no browser, nothing runs it. Worse, the poll re-read the empty 202 body without its status, classified itunknown, and a plain block (exit 3) became "never arrived" (exit 5).The engine now declares
runs_scripts = Falseand the wait is skipped. Browser engines are unchanged: they default to True.The first version of the test for this asserted "waited under 5 s" and stayed green against the fault, because the loop left after one 1-s poll. It now asserts no wait at all.
Evidence
requests, so its group never skips.runs_scriptsTrue;runs_scripts;--locale;http_scraper.py, with no browser installed.Not changed
pip install -r requirements.txt.--cdp-endpoint). The HTTP engine adds its own line naming the engine that can pass the WAF.🤖 Generated with Claude Code