答案 0 :(得分:0)
您可以尝试使用Scrapy FormRequest.from_response()
(但不能保证它会正常工作,因为您的页面可能使用了JavaScript):
yield scrapy.FormRequest.from_response(
response=response,
formname="your_form_name", # you can get it from DevTools in your browser
formdata={
"form_field_1": "value_1", # you can get fields / values from the Network tab in DevTools (after you submit your form)
},
callback=self.parse_form, # a code that will process response
)