如何将scrapy的标题信息直接传递给splash

时间:2017-08-01 11:37:14

标签: scrapy scrapy-splash

我想根据使用scrapy登录身份验证获得的标头信息登录splash。

我有两个问题。

问题1。

是否可以将使用scrpay登录获得的标头信息直接传递给splash?

问题2。

认识到没有必要执行登录验证是否有意义?

这是我的基本代码。

import scrapy
from scrapy_splash import SplashRequest

def test(self, response):
  self.logger.info("headers:-------"+ str(response.headers))
return SplashRequest(
       "url",
       self.test2,
       endpoint='execute',
       args={
       'lua_source': """Lua script""",
       'wait': 5,})

感谢您阅读我的问题。

0 个答案:

没有答案