Construct Ajax request to crawl Ctrip train ticket information and return error content

topic description

I want to write a crawler to crawl Ctrip"s train ticket information. I found that the ticket information was loaded asynchronously using Ajax, so I constructed a post request. Although headers,data and other data are available, the page information returned is incorrect. It should be the information of the page that jumps when the URL is wrong.

this is the Ajax request information generated when accessed by a browser


html:

May.23,2021

I use the 503 returned by your source code


I have solved this problem. Just delete the space between the Accept-language and Cache-Control lines

clipboard.png

Menu