@commands.command()
async def np(self,ctx):
async with aiohttp.ClientSession() as session:
params= {"api_key" : "censored",
"user" : "ssj4abd",
"period" : "overall",
"limit" : 10,
"method":"user.getTopArtists",
"format":"json"}
async with session.get(url="http://ws.audioscrobbler.com/2.0", params=params) as response:
resp = await response.read()
print(resp)
I am making it so that it retrieves the top (1st) artist of a user, the reply is something really long which you can find here. How do I retrieve/fetch only the "rank" : 1
artist from all that mess?