Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Your Scraper's "Success" Metric Is Lying When the Site Sends You an Empty 200

Most collection pipelines count a fetch as a success when the HTTP status starts with 2. That works right up until the day a site hands you a polite 200 OK with an empty body, a consent interstitial, or a "you must enable JavaScript" shell — and your pipeline happily records zero rows as a clean run. I run a daily collector over public Telegram channel previews (no login, just the web view). Last…

Most collection pipelines believe a fetch is successful when the HTTP status begins with 2. This method works until a site responds with a polite 200 OK, an empty body, or a message requiring JavaScript. I have a daily collector for public Telegram channel previews, which provides no login but offers a web view. One month, I received a successful run with zero messages from a channel that typically produces 30+ daily.

The status codes were all 200, exceptions were zero. The log indicated everything was fine, yet the channel had modified its preview rendering for datacenter IPs. My pipeline's sole indication of any change was the absence of data.

When a collector reports 0 new records, it cannot determine the reason: nothing new, the source moved, blocked, or reshaped, or the source changed shape under the parser. A status code does not differentiate these scenarios. A 200 with a shell page is considered a total success by your metric. To address this issue, I now utilize expectation-each-run invariants. Rather than relying on the transport layer, I assert on the payload shape: presence check, fingerprint check, and floor check.

Presence check ensures that the response contains at least one element matching the selector that carried data from the previous run. If there are zero matches from a channel with hundreds of messages in its archive, it is considered a failure, not a success. Fingerprint check involves hashing the DOM skeleton of the page, stripping the text, and comparing it to the last accepted run.

A significant deviation from the previous run triggers a shape-drift and archives the sample for inspection. Floor check is based on a rolling median of daily yield. If a run falls below ~20% of the median for a source that has been active for a week, it sends an alert. Quiet days are expected, but three consecutive low-performing days on the same source warrant attention.

While this method adds roughly 40 lines of code and creates an archived-sample folder, it has proven effective. The empty-200 switch on a specific channel was identified on the same day, not three days later when I manually checked the site. The general rule is that transport success signifies the server's response to "did you deliver bytes?" while your focus should be on the data's arrival.

The cheapest contract your pipeline can make is with the payload, not the protocol. Define the smallest structure that means "data present," assert it every run, and treat a well-formed empty as the only honest zero.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Riskified's Agent Identity Risk Intelligence Answers the Wrong Question First

On October 8, 2026, Riskified (NYSE: RSKD) launched Agent Identity Risk Intelligence — a system that identifies the AI personal assistant behind an order or customer-service request (Meta's Muse…

  • Riskified launches Agent Identity Risk Intelligence to identify AI assistants behind orders.
  • Platform integrates with Shopify and available via APIs, AWS Marketplace, Decision Studio, Zendesk.
  • Company plans limited beta release by December 2026, general availability by 2027.

Sproutpatch: you tell it how you feel, and it'll make you touch grass

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass I did not want another app that talks about going outside. I wanted one that shuts up and starts a timer.

  • Sproutpatch app uses AI Gemma to reply to user notes
  • App considers weather, daylight to suggest outdoor walks
  • Open-source, runs locally for user privacy

IRCv3 in Practice: Build a Modern IRC Bot with Capability Negotiation, SASL and Message Tags in Python

Hôm nay IRCv3 lên top Hacker News với hơn 300 điểm. Nhiều người nghĩ IRC là giao thức của thập niên 90 và đã "chết" từ khi có Slack hay Discord.

  • IRCv3 specification enhances modern IRC with message tags, SASL, timestamps
  • Python asyncio bot built using capability negotiation, SASL, tags
  • 60-line code avoids external libraries, demonstrates modern IRC bot

Galaxy Backbone Moves to Digitalise More MDAs from Current 30

Oghenevwede Ohwovoriole in Abuja The Managing Director of Galaxy Backbone (GBB), Prof. Ibrahim Adeyanju, has expressed the company’s plan to increase the number of digitalised Ministries, Departments…

  • Galaxy Backbone plans to digitalise more than 30 MDAs, expanding digitalisation efforts.
  • GBB aims to enhance paperless procedures and reach underserved areas in the digital transformation.

More from Monday 12 October →