123456789101112131415161718192021222324252627282930 |
- import requests
- import json
- url = "https://download.yifengaf.cn/excel/2020-12-28/10008097/订单API数据495633-20201228162500.txt"
- # headers = {"Content-Type": "application/json"}
- r = requests.get(url,).text
- # print(r)
- # b=[]
- # a=r.split('}')
- # for i in a[:-1]:
- # if i[-1]!='}':
- # b.append(json.loads(i+"}",strict=False))
- # else:
- # b.append(json.loads(i,strict=False))
- # print(b)
- # 17382,18898,19369,18523,19115,29603,26878,29302,17544,26930,26932,26903,26883,29600,22761,22260,23009,23421,26873,19821,20844,20324,20326,21126,17866,20115,20844,20326,21126
- def q():
- a="""{"merchant_id":"20201228235833_187292356_v5zy","transaction_id":,"type":"书币充值","money":"18.0","state":"未完成","create_time":"2020-12-28 23:58:34","finish_time":,"book_name":"神都猛虎","referral_url":,"user_id":"187292356","channel_id":"17228","subscribe_time":"","user_createtime":"","openid":"","ip":"","user_agent":""}"""
- print(
- json.loads(a)
- )
- if __name__ == '__main__':
- q()
|