Scrapy Response Handling: The Complete Beginner's Guide (Why Your Spider Ignores 404s)
dev.to·16h·
Discuss: DEV
🌐WARC Forensics
Preview
Report Post

When I first started scraping, I hit a confusing problem. My spider would visit a page, I could see the request in the logs, but my parse() method never got called. No data. No errors. Just... nothing.

After hours of debugging, I discovered the truth: the page was returning a 404. And Scrapy, by default, silently drops anything that isn’t a 200 response.

This behavior makes sense once you understand it, but nobody explains it clearly to beginners. Let me fix that right now.


The Big Secret: Scrapy Only Handles 200 Responses

Here’s what the documentation doesn’t emphasize enough:

By default, Scrapy only passes responses with status codes between 200 and 299 to your spider.

Everything else gets dropped silently:

  • 301 redirects? Dropped.
  • 302 redirects? Dro…

Similar Posts

Loading similar posts...