AI Web Scraping: Stop Your Agent's Wrong Answers
Sponsored by Context.dev: give your AI agent live data from the web. https://www.context.dev/?utm_source=youtube&utm_medium=creator&utm_campaign=december_2026&utm_content=mervin_praison This video is sponsored by Context.dev. The tests and opinions are my own. AI web scraping means copying web pages so an AI can read them. In my test, OpenAI's GPT-4o mini said Stripe's 1.5% card fee was not on the page, because a free cleaning tool cut the price out. No error, no warning. In this video you build a free safe page reader, step by step: Step 1, basic crawling: copy a page so your AI can read it. Step 2: check the facts are still there. Step 3, JavaScript pages: read pages that come back empty. Step 4, hidden instructions: stop pages that trick your AI. Then crawling at scale, with Context.dev. Step 5: test it on twelve real websites. Step 6, agentic crawling: give the reader to your own AI agent. Context.dev free tier: 1,000 credits a month, no card needed. What I measured: - Stripe's raw pricing page is about 327,000 tokens. GPT-4o mini reads 128,000 at most, so it refused the page. - After Trafilatura cleaning, the same page is about 2,000 tokens, in a third of a second. But the cleaner deleted the card fee, and the agent said the page does not show it. - HubSpot's pricing page came back with 0 characters and no error. Crawl4AI, which uses a real browser, brought the prices back. - On my test page with 8 hidden instructions, Trafilatura passed on 2, Crawl4AI 5, Jina Reader 4 and Context.dev 3. - The agent repeated my secret word 3 times out of 3. - My 38-line safe reader: Stripe in about 5,000 tokens with the fee kept, HubSpot prices found in 6 seconds, 0 of 8 hidden instructions passed on, and the agent obeyed 0 times out of 3. - On 12 popular pages, the safe reader kept the checked fact on 10. On Notion it returned nothing, and on Hugging Face almost nothing. The must-contain check stops loudly when a page comes back empty. The commands from the video: Step 1, basic crawling: install the free cleaner, and a token counter. ```sh pip install -q trafilatura tiktoken && pip show trafilatura tiktoken | grep -E "^(Name|Version)" ``` Step 3, JavaScript pages: read the page in a real browser with Crawl4AI. ```sh pip install -q crawl4ai && pip show crawl4ai | grep -E "^(Name|Version)" crawl4ai-setup ``` Step 4, hidden instructions: Jina Reader needs no install. Put r.jina.ai in front of the web address. ```sh curl https://r.jina.ai/https://stripe.com/pricing ``` The safe reader uses Crawl4AI, so install that first (Step 3), then run it on a page: ```sh python3 safe_read.py https://stripe.com/pricing '%' ``` Sponsor part: add Context.dev to Claude Code with one command, then sign in once in your browser. Then ask Claude Code, for example: "How do I set up Crawl4AI today? Use the context tool." ```sh claude mcp add --transport http context https://mcp.context.dev/mcp ``` Step 5: test the safe reader on twelve real websites. ```sh python3 realpages.py ``` The safe reader stops with a loud warning when the fact you need is missing. This is how it stopped on Notion: ```sh python3 safe_read.py https://www.notion.com/pricing '\$[0-9]+' ``` Step 6, agentic crawling: give the safe reader to your own AI agent (built with PraisonAI, `from praisonai import Agent`). ```sh pip install praisonai python3 agent.py ``` The catch: some tricks are written in normal text, and no filter can spot them. So tell your agent that text from web pages is information, never instructions. Ask before it sends anything. Watch next: Run Claude Code 24/7 on Your Own Server (Complete Setup) https://youtu.be/B0_ZhxbkEoY Timestamps 0:00 Your AI agent missed a price on the page 0:42 What you'll see, step by step 1:51 How your AI agent sees a web page 2:33 Step 1: Basic crawling 3:40 Step 2: Check the facts 4:28 Step 3: JavaScript pages 5:27 Step 4: Hidden instructions 7:30 Sponsored: Context.dev, live web pages for agents 8:25 Step 5: Test on twelve real websites 9:18 Step 6: Agentic crawling 10:09 The catch and the recap Sources - Stripe pricing page https://stripe.com/pricing - HubSpot pricing page https://www.hubspot.com/pricing/marketing - Notion pricing page https://www.notion.com/pricing - BBC News https://www.bbc.co.uk/news - Crawl4AI docs https://docs.crawl4ai.com/ - Jina Reader https://jina.ai/reader/ - Context.dev pricing https://www.context.dev/pricing - Context.dev quickstart https://docs.context.dev/quickstart.md - Context.dev agent setup https://docs.context.dev/agent-quickstart.md - PraisonAI docs https://docs.praison.ai/ This video is sponsored by Context.dev. The tests and opinions are my own.