这与使用Scrapy的
HtmlXPathSelectorhtml响应相同。唯一的区别是您应该使用
json模块来解析响应:
class MySpider(baseSpider): ... def parse(self, response): jsonresponse = json.loads(response.text) item = MyItem() item["firstName"] = jsonresponse["firstName"] return item
希望有帮助。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)