python实战 api接口调用

Last updated on November 22, 2024 pm

🧙 Questions

☄️ Ideas

import requests
import json

url = "https://platform.smm.cn/quotecenter/mainmental/currentinfo"
header = {'content-type': "application/json"}

req = requests.get(url=url, headers=header)

if req.status_code == 200:
    result = json.loads(req.text)
    if result["code"] == 0:
        req_data = result["data"]
        print("test")
        pass
    else:
        print(result)
else:
    raise ConnectionError("Request Error")

python实战 api接口调用
https://ispong.isxcode.com/pytorch/python/python实战 api接口调用/
Author
ispong
Posted on
March 24, 2022
Licensed under