scrapy + splash +自定义javascript

时间:2019-10-02 22:39:19

标签: scrapy scrapy-splash

我正在使用刮擦飞溅。问题是启动时每个请求只允许一个端点,因此如果我使用render.html,则不能将execute用作端点。我需要render.html来加载javascript数据并执行终结点以执行自定义javascript行。

我尝试使用将响应保存在文件中,并在下一个请求执行时使用,端点执行但没有运气

yield scrapy_splash.SplashRequest(URL,cookies=cks,endpoint='render.html',args={'lua_source': self.l, 'javascript': js,'wait': 5,'timeout':90,'html': 1, 'iframes': 1})

我只想在javascript呈现的页面上执行几行js,所以我需要同时使用render.html和execute

0 个答案:

没有答案
相关问题