{"data":{"id":44,"slug":"building-a-polite-scrapy-spider-part-3-44","title":"Building a polite Scrapy spider, part 3","excerpt":"For part 3, we revisit the basics with a fresh example and a few lessons learned the hard way. Scrapy makes it very easy to send thousands of requests a minute. Making a spider that a site operator…","seriesName":"Building a polite Scrapy spider","seriesPart":3,"sections":[{"heading":"Introduction","paragraphs":["For part 3, we revisit the basics with a fresh example and a few lessons learned the hard way. Scrapy makes it very easy to send thousands of requests a minute. Making a spider that a site operator would be happy to see in their logs takes a few deliberate settings."]},{"heading":"A practical approach","paragraphs":["Before writing a single line of code, look at how the page actually loads its data. Open the network panel, reload, and note which requests return the content you care about. Very often the data you want arrives as JSON from an endpoint you can call directly.","Log every request with its URL, status code and duration. When something goes wrong at two in the morning, those logs are the difference between a quick fix and a long investigation.","Time zones matter more than they seem. Store timestamps in UTC and convert only when displaying them."]},{"heading":"Step by step","paragraphs":["Deduplicate as you go. The same item often appears on several listing pages, and a stable identifier such as a SKU or ID makes duplicates easy to spot.","Read the site's terms of service before you start. Many sites welcome automated access within limits and say so explicitly; others ask you to use an API instead."]},{"heading":"Key takeaway","paragraphs":["Turn on ROBOTSTXT_OBEY, set AutoThrottle, use a descriptive User-Agent with contact details, and cache responses while you develop."]}],"authorId":5,"authorName":"Chen Patel","authorSlug":"chen-patel","category":"Scraping Basics","tags":["json","playwright","selenium"],"publishedAt":"2026-06-11T00:00:00.000Z","wordCount":221,"readingTimeMinutes":2}}