CrawlSpider with Splash getting stuck after first URL

主宰稳场 提交于 2019-12-05 21:31:37
scriptso

Use SplashRequest instead of scrapy.Request... Check out my answer CrawlSpider with Splash

def use_splash(self, request):
request.meta['splash'] = {
        'endpoint':'render.html',
        'args':{
            'wait':0.5,
            }
        }     
return request

You should amend it to

def use_splash(self, request):
    return SplashRequest(xxxxxx)

or you can rewrite this function

    def _build_request(self, rule, link):
        r = Request(url=link.url, callback=self._response_downloaded)
        r.meta.update(rule=rule, link_text=link.text)
        return r

I can't guarantee it will work.I'm watching this, too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!