Desoul Review Tiếng Việt

← Guides

Turning news pages into clean Markdown for a model

The job is feeding news to a model. A scheduled reader for my project pulls news articles from RSS feeds and hands the article text to a model. It already had a small extractor that reads paragraphs and stops at 6,000 characters. On 5 November 2026 I ran crawl4ai (version 0.9.5) next to it on the same pages to see whether a dedicated crawler does the job better.

What I ran

Five articles taken that day from the feeds the reader already uses: ABC News, Guardian Australia, the Sydney Morning Herald, The Conversation and 7NEWS. Plus two Google News links from the same feed list. crawl4ai ran two ways, through a headless browser and over plain HTTP with no browser, both with its "fit Markdown" noise filter (PruningContentFilter, threshold 0.48).

git clone --depth 1 https://github.com/unclecode/crawl4ai.git repo
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python ./repo          # 10 s, venv ends up 610 MB
.venv/bin/python -m playwright install chromium           # 21 s, 203 MB browser

To compare the two, I took every sentence longer than 60 characters from my extractor's output and counted how many also appeared in crawl4ai's.

What came out

Characters per article, mine (cap removed) against crawl4ai raw and filtered, then coverage:

What broke

What I kept

Not the library. Its filter scores each block by how much of its text is link text, and that idea moved into my own extractor: read list items as well as paragraphs, and skip any item where more than half the text is links. Tested on a scratch copy against the same five pages, it recovered the twelve flight lines, dropped two newsletter sign-up lines on the Guardian, and left the other three articles unchanged.

crawl4ai's block detector is also worth reading: a short list of patterns that recognise Cloudflare, Akamai, Imperva and similar block pages that come back with status 200. A plain extractor can't tell a blocked page from an empty one.

Pick crawl4ai if you are in Python and need pages built by JavaScript, or a whole-site crawl. For news sites that serve plain HTML, a small extractor did the same job with less noise.

Tools in this test