Scraping a JSON response with Scrapy
It’s the same as using Scrapy’s HtmlXPathSelector for html responses. The only difference is that you should use json module to parse the response: class MySpider(BaseSpider): … def parse(self, response): jsonresponse = json.loads(response.text) item = MyItem() item[“firstName”] = jsonresponse[“firstName”] return item