http://www.iata.org/publications/Pages/code-search.aspx
希望能够在网址中传递航空公司代码,以便我可以遍历多个。我希望传递类似“?airlinecode = AL”等的内容,然后抓取html的结果。
我已经看过html源代码了,但这超出了我的理解。
感谢是否有人可以解决这个问题。
答案 0 :(得分:0)
只需查看Google Chrome中的网络标签,您就可以看到请求和响应。
因此,您可以为您编写代码。
当我搜索一些随机字符串时,它是这样的:
Request URL:http://www.iata.org/publications/Pages/code-search.aspx
Request Method:POST
Status Code:200 OK
Remote Address:104.20.42.133:80
Referrer Policy:no-referrer-when-downgrade
请求标题:
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8,pt;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Content-Length:5317
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Cookie:__cfduid=d64ca2df817d311b819a79a25289519d41508108542; __gads=ID=dfff489f820f5049:T=1508108551:S=ALNI_MYWjCWrS3sYU_JM81qlTiyHM8bRzQ; WSS_FullScreenMode=false; _ga=GA1.2.850863629.1508108550; _gid=GA1.2.729851041.1508108552; _dc_gtm_UA-4245951-1=1; __ar_v4=%7CAHW2E66F75EETC67CSYCSS%3A20171014%3A1%7CJJVGJIJFTRFWBJ2JYF2GR2%3A20171014%3A1%7CUE2CPQ6EVVBJBDHQ4S2DO6%3A20171014%3A1; _gali=ctl00_SPWebPartManager1_g_e3b09024_878e_4522_bd47_acfefd1000b0_ctl00_butSearch
Host:www.iata.org
Origin:http://www.iata.org
Referer:http://www.iata.org/publications/Pages/code-search.aspx
User-Agent:Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1
X-MicrosoftAjax:Delta=true
X-Requested-With:XMLHttpRequest