1、处理API响应
import requests #执行API调用并存储响应 url = "https://api.github.com/search/repositories?q=language:python&sort=stars" r = request.get(url) print("stata code: " + r.status_code) #将API响应存储在一个变量中 response_dict = r.json() #处理结果 print(response_dict.keys())