ScrapySplash表单要求方法不是post

问题描述 投票:0回答:1

我使用此请求使用scrapy plash进行表单请求,但它说该方法是没有的,飞溅只能处理并在

yield SplashFormRequest(url, args={'wait': 5, 'http_method':"POST", 'body' : body, 'cookies':cookie}, headers=headers, callback=self.parse_listings, dont_filter=True)
如何使其发布方法?

post scrapy scrapy-splash
1个回答
0
投票
当我打开SplashFormRequest的源代码时,它们的代码与SplashRequest不一致。 SplashRequest在ARG中声明了该方法,而SplashFormRequest则声明该方法如标准的砂纸请求。我通过这样的重写修复了它。

yield SplashFormRequest(url, method="POST", args={'wait': 5, 'body' : body, 'cookies':cookie}, headers=headers, callback=self.parse_listings, dont_filter=True)

	
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.