import requests
#调用requests模块,负责上传和下载数据
logisticsName = input(‘你的快递是什么物流呀?(输入拼音)’)
courierNum = input(‘你的快递单号是什么呀?’)
url = ‘https://www.kuaidi100.com/query?’
#使用get需要一个链接
a=’’‘Accept: application/json, text/javascript, /; q=0.01
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Connection: keep-alive
Cookie: csrftoken=llmpcOKhx7f2ZGbgQhbaqs8T2Yx4-Bk_EINE1onLX-k; WWWID=WWW77F1916142630A6781E0D7B2C6CF765D; Hm_lvt_22ea01af58ba2be0fec7c11b25e88e6c=1577676280; Hm_lpvt_22ea01af58ba2be0fec7c11b25e88e6c=1577676280
Host: www.kuaidi100.com
Referer: https://www.kuaidi100.com/
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36
X-Requested-With: XMLHttpRequest’’’
headers = dict
输入单号爬取最新物流信息
最新推荐文章于 2024-09-12 00:45:51 发布