我正在使用scrapy FormRequest.from_response对象。我有:
x = FormRequest.from_response(response,formname='aspnetForm', headers=post_headers , url=url, callback=self.test1)
在调试器中:
>>> x.body
ContentPlaceHolder1%24chkIncludeParty=on&ctl00%24ContentPlaceHolder1%24ddlMotions=Y&ctl00%24ContentPlaceHolder1%24btnSearch=Search'
我想更新字段'ctl00 $ ContentPlaceHolder1 $ ddlMotions'scrapy是否提供了更新参数的简便方法。我在文档中看到https://doc.scrapy.org/en/latest/topics/request-response.html#scrapy.http.Response.replace,但我不确定这在这里是否有用。