Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
Python & Django

Scraping That Keeps Working

Last updated:

Check what you are permitted to do

Before building anything, read the site's terms and its robots file. Some sites permit collection, some prohibit it, and some offer an API that makes scraping unnecessary.

An API, where one exists, is always better: stable, documented, permitted and less work. Check for one before building a scraper.

Be a considerate client

  1. Rate limit yourself well below anything that would burden the site
  2. Identify yourself honestly in the user agent
  3. Cache so you do not fetch the same page repeatedly
  4. Respect the robots file
  5. Back off when you receive errors rather than retrying immediately

Structure changes will break it

Websites change without notice. A scraper depending on a specific structure will break, and the question is only whether you find out immediately or in six weeks.

  • Validate that extracted data looks plausible before storing it
  • Alert when the extraction rate drops
  • Alert when a field is suddenly empty across all records
  • Store the raw response so a change can be diagnosed

Monitor for silent failure

SignalMeans
Zero records extractedStructure changed or blocked
Records extracted but fields emptySelectors broken
Values outside expected rangesParsing wrong
Sudden volume changeSource changed
Increasing error responsesBeing rate limited or blocked

A scraper that returns nothing and reports success is the standard failure, and it is entirely preventable with a plausibility check.

Handle personal data properly

Publicly accessible does not mean freely usable. Personal data collected from the web carries the same obligations as personal data collected any other way.

Decide the lawful basis, the retention and the purpose before collecting, rather than after.

Frequently asked questions

Is web scraping legal?

It depends on jurisdiction, the site's terms, and what you collect. Public factual data is generally more defensible than personal data. Take advice where it matters.

How do we handle sites that block scrapers?

Consider whether you should be scraping them at all. Circumventing deliberate blocking is a different proposition from collecting from a site that permits it.

What about JavaScript-rendered pages?

A headless browser handles them at considerably higher cost. Check whether the data is available in an underlying request first.

How often do scrapers break?

Frequently. Budget for ongoing maintenance rather than treating it as a one-off build.

Keep reading

Scraper that stopped working and nobody noticed?

Plausibility checks and absence alerting prevent that. Happy to look at what you are running.

Book a free 30-minute call Get a project estimate WhatsApp us

Related services

What we build for problems like this one

Custom Software DevelopmentWeb DevelopmentMachine Learning