I'm new on it all. I have a url that returns me a token, in a json format. This token changes all the time I call this url. It's something like this:
{
"token": {
"token": "randomtoken",
"result": 1,
"resultCode": "2",
"requestId": "3"
}}
I want to print just the result of token key when I call my python code, which is like this:
import requests as req
resp = req.get("http://myurl.com.br")
print(resp.text)
This python code is returning me the following result:
{"token":{"token":"randomtoken","result":1,"resultCode":"2","requestId":"3"}}
How can I print just the token key result? Like just:
"randomtoken"
It's possible?