美文网首页
2020-01-20--中通快递post信息保存

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

作者: heiqimingren | 来源:发表于2020-01-20 18:37 被阅读0次

    发出的信息
    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!

    相关文章

      网友评论

          本文标题:2020-01-20--中通快递post信息保存

          本文链接:https://www.haomeiwen.com/subject/nvzjzctx.html