1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > 顺丰快递单号批量提取

顺丰快递单号批量提取

时间:2020-10-22 08:26:35

相关推荐

顺丰快递单号批量提取

import requests,jsonfrom lxpy import copy_headers_dict# cookie写自己的就行for page in range(1,1000):url = "https://www.sf-/sf-service-core-web/service/waybills/list/send?lang=sc&region=cn&translate=sc&timestamp=1669796557279&pageNo="+ str(page) +"&pageRows=10"headers = '''Accept: application/json, text/plain, */*Accept-Encoding: gzip, deflate, brAccept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6Connection: keep-aliveCookie:Host: www.sf-Referer: https://www.sf-/we/ow/chn/sc/waybill/listUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.56'''headers = copy_headers_dict(headers)res = requests.get(url=url,headers=headers)# print(res.text)res = json.loads(res.text)if len(res['result']['content']) == 0:print("ending...")breakfor i in range(len(res['result']['content'])):orderno = res['result']['content'][i]['waybillno']city = res['result']['content'][i]['destinationCityName']endTime = res['result']['content'][i]['endTime']print(orderno,city,endTime)

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。