Spider:
import scrapy
from scrapy_splash import SplashRequest
class TestSpider(scrapy.Spider):
name = 'test'
def start_requests(self):
splash_args = {
'png': 1,
'render_all': 1,
'wait': 2,
}
url = 'https://google.com'
yield SplashRequest(
url,
callback=self.parse_splash,
endpoint='render.png',
args=splash_args
)
yield scrapy.Request(
f"http://localhost:8050/render.png?url={url}&wait=2&render_all=1",
self.parse_request,
)
def parse_request(self, response):
with open('request.png', 'wb') as f:
f.write(response.body)
def parse_splash(self, response):
with open('splash.png', 'wb') as f:
f.write(response.body)
Problem: with scrapy.Request all ok, but in splash.png I see this instead of the Google page screenshot. What's wrong with SplashRequest?
P.S. Issue added