- Eleven page verdicts, from challenge and captcha to login wall and empty shell; names the anti-bot vendor when the page shows it.
- Dataset check: dropped rows, missing or emptied fields, type changes, duplicates, block-page text saved as values.
- Reads JSON, JSON Lines, CSV and gzip; the server's character set decides, so pages in Russian or Japanese are not read as garbage.
- "Page not found" in about 35 languages, each phrase from a page that really came back.
- Standard library only, Python 3.10+.
Catch the 200 OK that isn't.
Your scraper didn't fail. It succeeded at saving a captcha.
falseok reads the page you just downloaded and tells you whether it is the page you asked for. It recognises blocks. It never tries to get around them.
$ pip install falseokThe status says 200. The page says something else.
A blocked request rarely looks like a failure. The server answers 200 OK, your code saves the page, and the run reports success. You find out days later, in the data.
Twelve tools, the same fresh pages.
982 pages drawn at random from 40,432 fresh pages on 30,066 sites, in 38 languages. No rule of any falseok version was written or tuned on them. The other tools stay unnamed here; the benchmark on GitHub says what each one is built to catch.
| Tool | Wrong verdicts | Blocks caught | Unusable "200 OK" caught | Real pages flagged | ms per page |
|---|---|---|---|---|---|
| falseok | 97.4% | 73.1% | 0.5% | 1.59 | |
| BUILT FOR THE SAME JOB | |||||
| a Rust scraper's anti-bot classifier | 94.9% | 33.7% | 0.2% | 1.68 | |
| the blocked-page detector of a popular Python crawler | 94.9% | 33.7% | 0.2% | 3.15 | |
| a new Python response classifier | 65.0% | 20.2% | 0.3% | 49.5 | |
| the most used anti-bot detector, JavaScript | 63.2% | 3.8% | 0.0% | 2.21 | |
| a Rust challenge detector | 64.1% | 14.4% | 25.9% | 0.17 | |
| RULES INSIDE SCRAPING FRAMEWORKS | |||||
| the ban rule of the most used proxy-rotation add-on | 96.6% | 6.7% | 0.0% | 0.12 | |
| the blocked-request rule of a major crawling framework | 94.0% | 0.0% | 0.0% | 22.7 | |
| the challenge checks of the most used Cloudflare library | 0.0% | 0.0% | 0.0% | 0.02 | |
| ONE-LINE CHECKS | |||||
| status-code check (4xx/5xx = bad) | 95.7% | 0.0% | 0.0% | <0.01 | |
| page-size check (under 10 KB = bad) | 92.3% | 42.3% | 1.5% | <0.01 | |
| keyword search (captcha, blocked, access denied…) | 83.8% | 51.0% | 77.3% | 2.89 | |
More than a block detector.
Each release, measured on the same pages.
3 versions on the same fresh pages: 982 labelled pages and 5,315 made-up addresses. Version 0.3 is the one in the benchmark above.
Milliseconds per page
shorter is better
Made-up addresses answering 200, caught
of 5,315 made-up addresses on real sites
Everyday pages right
on the 982 labelled pages
- Under 2 ms a page: about 1.3 times faster than the most used JavaScript anti-bot detector.
- Response headers as input: reads the anti-bot service's own block marker and names the vendor.
- "Page not found" and "access denied" wording in 44 languages.
- Error 500 to 504 pages served with status 200, and pages that only say "Loading...", are caught.
- The first public benchmark: 12 tools on the same fresh pages.
- Addresses as input: a redirect to a sign-in, consent, error or captcha page is a signal.
- What to do next on every page: keep, retry, back off, render JavaScript or drop, with a confidence level.
- Many pages on every CPU core: 2,000 files 3.6 times faster, same results and order.
- Your own rules: add rules or switch built-in ones off without editing the rules file.
- Page facts: content kind, canonical address, meta refresh target, script count.
- A verdict you can call sure A confidence level you can act on without a second look, and an honest "not sure" for the rest.
- Faster Less time per page, so it stays noise next to the download.
- falseok for JavaScript The same rules and the same verdicts on npm, for scrapers that are not written in Python.
- A badge and a one-page report A README badge and a one-page HTML report of a run, to send to a client or keep next to the data.
Three lines.
Works with whatever fetches your pages: it only needs the bytes you got back. Pass the status, the headers and the address when you have them, and it gets sharper.
$ pip install falseok $ falseok page product.html --status 200 $ falseok data today.json --vs yesterday.json
from falseok import check_page r = check_page(html, status=200, url=url) print(r.ok, r.verdict, r.action)