【发布时间】:2019-09-17 16:29:52
【问题描述】:
我需要抓取this 网站。
是用 React 制作的,所以看起来。然后我尝试用scrapy-splash提取数据。例如,我需要类shelf-product-name 的“a”元素。但响应是一个空数组。我在大约 5 秒内使用了 wait 参数。
但我只得到一个空数组。
def start_requests(self):
yield SplashRequest(
url='https://www.jumbo.cl/lacteos-y-bebidas-vegetales/leches-blancas?page=6',
callback=self.parse,
args={'wait':5}
)
def parse(self,response):
print(response.css("a.shelf-product-name"))
【问题讨论】:
标签: python reactjs scrapy scrapy-splash