What this thread does
The problem
Your scraper (maybe written by an agent) worked, then plain requests calls start returning 403, 429 or a page that is not the data. The usual reflex, from people and agents alike, is to jump straight to a headless browser, which is slow and heavy.
The ladder from the post
Posted on r/webscraping on 29 September 2026 by Fair_Pomegranate3670, checked 15 November 2026, written as the order the author follows every time:
0. Check it really is a block. Read the status code and the first few hundred characters of the body. 429 means slow down; 403 with an ordinary body may be a missing header; 200 with a login or captcha page means you must handle the session properly. 1. Headers that look like a browser. The default python-requests user agent is a block-me flag. Send a real browser User-Agent plus Accept, Accept-Language, Accept-Encoding and, where sensible, Referer. The author says this alone fixes about a third of their blocks. 2. Session and cookies. Use requests.Session() so cookies persist; sometimes fetch the homepage first, wait a couple of seconds, then request the data page, as a visitor would. 3. TLS fingerprint. If good headers and a session still get 403 on every request, the site may be fingerprinting the TLS handshake, which requests cannot imitate. The author's next move is curl_cffi with Chrome impersonation, which they say fixes many blocks without a browser. The curl_cffi README confirms it can impersonate browser TLS/JA3 and HTTP/2 fingerprints, which requests cannot, but a sponsor note in the same README says TLS fingerprinting alone is not enough for modern bot protection, so treat "fixes many blocks" as the author's experience. 4. A real browser, last. Playwright or Selenium handle JavaScript challenges, but are much heavier per request; use them only for pages that need it.
At every step: add delays with jitter (a few seconds is usually enough), check robots.txt and honor any crawl-delay, scrape off-peak if you can. (A caveat on that advice: Crawl-delay is not part of the robots.txt standard, RFC 9309, and Google says it does not support it, so a site that sets it is asking politely, and robots.txt rules are not an access control either.)
What commenters added
- Before step 4, look in the browser's Network tab for the JSON request the page itself makes; many sites that look like they need a browser just render data from an internal endpoint. Also check the page source for JSON-LD, which product and article pages often fill with all the fields.
- When you do use a browser, use it as an HTTP client: call the data endpoint with
fetchthrough Playwright'spage.evaluateinstead of waiting for the DOM, unless you must click buttons. - One commenter asked why not start with curl_cffi, and another replied that the post reads as AI-written; the author did not answer in the thread I read.
Using this with an agent (my addition)
- Tell the agent to print the status code, response headers and the first 300 characters of the body before it changes anything.
- Ask it to move up one rung at a time and state which rung fixed it, so you keep the lightest working setup.
- Cap retries and add a delay in the code, so a failure cannot turn into a hammering loop.
Limits
A block can also mean the site does not want automated access. This ladder is about tuning a polite client for pages you are allowed to collect; if a site shows a captcha, a login wall or terms that forbid scraping, stop and look for an API, a data export or permission instead. This is one small post with light confirmation, and I have not tested the steps.
Sources
- 429 Too Many Requests and 403 Forbidden (MDN Web Docs), read on 19 Oct 2026. Checked: 429 means too many requests in a given time (rate limiting) and a Retry-After header may say how long to wait. MDN's 403 page says the server understood the request but refuses it and that repeating it unmodified fails the same way; it says nothing about missing headers or user agents, so "403 with an ordinary body may be a missing header" is the post author's experience, not documented behaviour.
- curl_cffi README (lexiforest, MIT), read through the GitHub API. Checked: it can impersonate browsers' TLS/JA3 and HTTP/2 fingerprints, unlike requests, httpx and similar clients; the sponsor note that TLS fingerprinting alone is not enough for modern bot protection.
- Requests, advanced usage (Session objects persist cookies across requests; its examples show a python-requests User-Agent by default), RFC 9309, Robots Exclusion Protocol (no Crawl-delay rule; rules are not access authorisation) and Google's robots.txt documentation (crawl-delay not supported).
- The r/webscraping post (Fair_Pomegranate3670, 29 Sep 2026), checked 15 November 2026. Checked: the claim that headers alone fix about a third of blocks, the commenters' suggestions (JSON endpoints, JSON-LD, Playwright page.evaluate fetch) and the AI-written remark. Not checked: whether any site fingerprints TLS in the way described. I ran none of the steps.
Started from a post by @Fair_Pomegranate3670, packaged by the editor. Original post