# -*- coding: utf-8 -*-
import scrapy
class GranaSpider(scrapy.Spider):
name = 'grana'
allowed_domains = 'www.graana.com'
start_urls = ['https://www.graana.com/api/area/slug/601']
def parse(self, response):
# for url in allurlList:
scrapy.http.Request(response.url, method='GET' , dont_filter=False)
print(response.body)
#convert json response to array and save to your storage system
当它发送GET请求以获取有关属性的信息时,您应该在代码中模拟相同的操作。(您可以在控制台->;网络->;XHR下观察GET调用)
输出是json格式的,请根据需要进行转换。你知道吗
相关问题 更多 >
编程相关推荐