Answer the question
In order to leave comments, you need to log in
How to get certain data from the .json() variable of the view?
Using the requests library, I received data from the site and enclosed it in a variable, attributed it to .json () to print it out, but from all the junk that I output, I only need certain data. Here is the code:
import requests
import config
TRN = config.TRN
ni = input('epic-nickname: ')
pl = input('platform: ')
response = requests.get(
'https://api.fortnitetracker.com/v1/profile/' + pl + '/' + ni,
headers= {'TRN-Api-Key':TRN}
)
r = response.json()
print(r)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question