📅  最后修改于: 2022-03-11 14:46:18.388000             🧑  作者: Mango
import requests
import simplejson as json
url = "api_url"
response = requests.get(url)
x = json.loads(response.text)
#Note the {} get auto replace by the data you were looking for
print('protocol: {}'.format(x.get('protocol'))) #replace 'protocol' with the data specific you need like 'id'
print('responseTime: {}'.format(x.get('responseTime')))
print('reputation: {}'.format(x.get('reputation')))