2020-01-20--中通快递post信息保存

发出的信息
POST https://hdgateway.zto.com/order_searchAddress HTTP/1.1
Host: hdgateway.zto.com
Connection: keep-alive
Content-Length: 23
Accept: /
Origin: https://www.zto.com
x-token: null
x-clientCode: pc
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.zto.com/express/expressCheck.html
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9

billCode=75327055544264


返回信息!
HTTP/1.1 200
Server: nginx
Date: Mon, 20 Jan 2020 10:26:20 GMT
Content-Type: application/json;charset=UTF-8
Connection: keep-alive
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://www.zto.com
X-Application-Context: application:prd
Content-Length: 304

{"result":{"receiverAddress":"人民政府","senderAddress":"人民政府","senderCounty":"盘山县","senderProvince":"辽宁省","receiverProvince":"上海","receiverCounty":"奉贤区","receiverCity":"上海市","senderCity":"盘锦市"},"message":"获取地址成功","status":true,"statusCode":null}

POST https://hdgateway.zto.com/WayBill_GetDetail HTTP/1.1
Host: hdgateway.zto.com
Connection: keep-alive
Content-Length: 23
Accept: /
Origin: https://www.zto.com
x-token: null
x-clientCode: pc
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.zto.com/express/expressCheck.html
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9

billCode=75327055544264

HTTP/1.1 200
Server: nginx
Date: Mon, 20 Jan 2020 10:26:20 GMT
Content-Type: application/json;charset=UTF-8
Content-Length: 2518
Connection: keep-alive
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://www.zto.com
X-Application-Context: application:prd

{"result":{"prescriptionStatus":2,"logisticsRecord":[[{"date":"2020-01-09","country":null,"internationalPieces":{"optReasonEn":"Arrival at inward office of exchange.","isExport":null,"siteName":null,"optReason":null,"dispCount":1,"dispNoCome":false},"signMan":null,"operateUserPhone":"13386815067","scanDate":"2020-01-09 17:51:30","scanSite":{"isCenter":true,"code":"42700","province":"辽宁省","city":"盘锦市","phone":"0427-2209547、0427-2209508","name":"盘锦中转","prov":"辽宁省"},"sendPiecesNum":0,"isSendNoCome":false,"operateUser":"盘锦中转盘锦","stateDescription":"【盘锦市】 快件已经到达 【盘锦中转】","scanType":"到件","problemItemDescription":"","upOrDownSiteInfo":{"isCenter":false,"code":"42712","province":"辽宁省","city":"盘锦市","phone":"024-31515455","name":"盘锦中转市场部","prov":"辽宁省"}},{"date":"2020-01-09","country":null,"internationalPieces":{"optReasonEn":"Departure from inward office of exchange.","isExport":null,"siteName":null,"optReason":null,"dispCount":1,"dispNoCome":false},"signMan":null,"operateUserPhone":"13364255067","scanDate":"2020-01-09 17:43:26","scanSite":{"isCenter":false,"code":"42712","province":"辽宁省","city":"盘锦市","phone":"024-31515455","name":"盘锦中转市场部","prov":"辽宁省"},"sendPiecesNum":0,"isSendNoCome":false,"operateUser":"众聚德","stateDescription":"【盘锦市】 快件离开 【盘锦中转市场部】 已发往 【盘锦中转】","scanType":"发件","problemItemDescription":"","upOrDownSiteInfo":{"isCenter":true,"code":"42700","province":"辽宁省","city":"盘锦市","phone":"0427-2209547、0427-2209508","name":"盘锦中转","prov":"辽宁省"}},{"date":"2020-01-09","country":null,"internationalPieces":{"optReasonEn":"Parcel scanned by site.","isExport":null,"siteName":null,"optReason":null,"dispCount":1,"dispNoCome":false},"signMan":null,"operateUserPhone":"13364255067","scanDate":"2020-01-09 17:32:29","scanSite":{"isCenter":false,"code":"42712","province":"辽宁省","city":"盘锦市","phone":"024-31515455","name":"盘锦中转市场部","prov":"辽宁省"},"sendPiecesNum":0,"isSendNoCome":false,"operateUser":"众聚德","stateDescription":"【盘锦市】 【盘锦中转市场部】(024-31515455) 的 众聚德(13364255067) 已揽收","scanType":"收件","problemItemDescription":"","upOrDownSiteInfo":null}]],"billPrescription":"0天0小时","billCode":"75327055544264"},"message":"快递信息查询成功","status":true,"statusCode":null}

上面这一堆数据,看起来真的太乱了,层次很多。结果用json.cn这个网站处理,就发现了,规律很民心啊嘛!


image.png

里面红色框的就是我想要的,然后用正则提取就可以!so easy!

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 我用fiddler抓取到的数据---这里整理一下。 YT4306427009445 POST https://ww...
    heiqimingren阅读 4,344评论 0 1
  • 大家好,我是IT修真院成都分院第7期的学员韩建名,一枚正直纯洁善良的WEB前端程序员。 今天给大家带来的是:简述a...
    inh_阅读 3,424评论 0 1
  • 早晨一醒来,看到外面灰暗的天空,阴雨绵绵,雨涵同时也醒来了。穿戴好衣服,她问,妈妈还有多久过年啊,我说还两个多月吧...
    潘雨涵妈妈阅读 1,384评论 0 2
  • 再一次自己睡在大舅的楼上。蓦然想到十几年前,欢姐盼姐上初中,我最喜欢跟在她们后面。就这样跟着就很开心。她们会...
    c7c33ec23477阅读 2,325评论 0 1
  • 昨天萱休息,带她去修复身体,回来,重重的包交给她,人家不愿意,提了一阵开始抗议:这么重的包干嘛给我提啊? 宝啊,不...
    小萱妈阅读 819评论 0 0