2017-06-19 3 views
3

Ich verwende scrapy-splash zum Crawlen von Webseiten und zum Ausführen von Splash-Service auf dem Andockfenster.Wie man Splash Timeout in scrapy-splash einstellt?

commond:

docker run -p 8050:8050 scrapinghub/splash --max-timeout 3600 

Aber ich habe einen 504 Fehler.

"error": {"info": {"timeout": 30}, "description": "Timeout exceeded rendering page", "error": 504, "type": "GlobalTimeoutError"} 

Obwohl ich versuche splash.resource_timeout, request:set_timeout oder SPLASH_URL = 'http://localhost:8050?timeout=1800.0' hinzuzufügen, hat sich nichts geändert.

Danke für Hilfe.

Antwort

4

Ich benutze scrapy-splash Paket und den Timeout in args Parameter von SplashRequest wie folgt aus:

yield scrapy_splash.SplashRequest(
    url, self.parse, endpoint='execute', 
    args={'lua_source': script, 'timeout': 3600}) 

Es funktioniert für mich.

+1

Ich habe Fehler 400 von dieser Einstellung. Ich weiß nicht warum –