After calling the api with Python, no json file appears. Instead, the following situation occurs, see screenshot.
from pprint import pprint
import requests
import json
token = 'EF8EA-070DF-BBEBE-EFDE4'
headers={"DAIWAN-API-TOKEN":token}
page=requests.get("http://lolapi.games-cube.com/GetChampionDetail?champion_id=1",headers = headers)
pprint(page.json)
三叔2017-06-12 09:21:53
See why after using requests.get URL, the .text response content is in the form of a dictionary, but type it is str
page.json()
or
eval(page.text)