How to set splash timeout in scrapy-splash?
我使用scrapy-splash抓取网页,并在docker上运行splash服务。
命令:
1 | docker run -p 8050:8050 scrapinghub/splash --max-timeout 3600 |
但我收到了 504 错误。
1 | "error": {"info": {"timeout": 30},"description":"Timeout exceeded rendering page","error": 504,"type":"GlobalTimeoutError"} |
尽管我尝试添加
感谢您的帮助。
我使用
1 2 3 | yield scrapy_splash.SplashRequest( url, self.parse, endpoint='execute', args={'lua_source': script, 'timeout': 3600}) |
它对我有用。