{"data":{"id":116,"slug":"detecting-lazy-loaded-content-part-6-116","title":"Detecting lazy-loaded content, part 6","excerpt":"Part 6 looks at what changes when the same technique has to run every day in production. Lazy loading defers images and sections until they are about to scroll into view. A script that reads the page…","seriesName":"Detecting lazy-loaded content","seriesPart":6,"sections":[{"heading":"Introduction","paragraphs":["Part 6 looks at what changes when the same technique has to run every day in production. Lazy loading defers images and sections until they are about to scroll into view. A script that reads the page immediately sees placeholders instead of content."]},{"heading":"A practical approach","paragraphs":["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.","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":"Common pitfalls","paragraphs":["Treat HTTP 429 responses as a signal, not an obstacle. Read the Retry-After header, back off, and resume at a slower pace.","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."]},{"heading":"Key takeaway","paragraphs":["Scroll the element into view and wait for its real attributes to appear, or read the data-src style attributes that hold the eventual values."]}],"authorId":3,"authorName":"Priya Nakamura","authorSlug":"priya-nakamura","category":"Browser Automation","tags":["scrapy","javascript"],"publishedAt":"2026-05-26T00:00:00.000Z","wordCount":213,"readingTimeMinutes":2}}