The type values are as follows:
The form form for the Web site is as follows:
Data type: Multipart/form-data, four of the most common post submission method is used to upload files, while using boundary to separate different fields, to avoid duplication of content (Baidu check)
Using the Requests module test, the comparison pit was measured for 2 hours (small white does not know how to pass the value) to get the conclusion:
The boundary in payload is the same as the value in headers:
The local payload format is:
Turn the page by changing the corresponding value, and next use the scrapy operation
Precautions:
I use Scrapy. Formrequest transfer parameters can not be successful, debug after the relevant reasons, there has been no running results, continue to search online information:
Use Scrapy instead. Request for post data in the following format:
Before the use of Body=json.dumps (Form_data), run failed, do not know what the reason, the test found direct form_data can be
Headers be sure to add the Content-type field, my headers is:
Rerun the project and discover the success of the run
Scrapy Post Request Payload type value