Zepto Scraper in Python: Pulling Category Listings, Prices and Stock Data
Zepto, the Indian 10-minute grocery app, shows selling price, MRP, discount and stock count on each product card, and a short Python workflow can export these to CSV. The site sits behind AWS WAF, so a plain requests call returns a 202 with an empty body, and checking only for errors with raise_for_status() would miss this. Routing requests through Scrape.do with no extra parameters returns the full page, and the product data is embedded in the HTML as Next.js stream chunks that can be decoded with a regular expression and JSON parsing. Out-of-stock cards use a different leading key, so anchoring the parser on only one key silently drops products. The article's fix is to anchor on both keys and deduplicate by variant ID.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in