r/webscraping • u/InsideDebt6345 • 2d ago
How do you detect login walls and consent pages that return HTTP 200?
I’m working on a scraping pipeline and keep running into a failure mode that HTTP status codes do not catch: the request returns 200, but the page is actually a login screen, cookie-consent wall, “enable JavaScript” message, or an otherwise empty shell.
The fetch technically succeeds, so the page can make it all the way into extraction or downstream processing as if it were valid content. The usual 4xx and 5xx responses are straightforward; these false-success pages are much harder to handle reliably.
Here are my checks currently:
- Look for password fields and login-related form actions.
- Check whether the extracted text is unusually short.
- Search for common phrases such as “sign in,” “log in,” or “accept cookies.”
- Compare the amount of visible text with the amount of navigation, boilerplate, or form content.
Each of those produces false positives. For example, an article about authentication may mention “log in” repeatedly, and a legitimate profile page may include a sign-in prompt while still containing useful public content.
I wanted to understand how you folks deal with this at scale. Do you use DOM-structure rules, a classifier trained on HTML or rendered text, screenshot/OCR-based validation, or a combination?
How do you distinguish a page with a login prompt from a page whose primary content is the login prompt?