-1

I have a REST Api that only renders this data

data:   "xxxxxxxxxxxxxxx"

I need to store this XXXXXXXXXX value in some variable using python, but I could only code and reach to the part where I get this value data:"xxxxxxxxxxxxxx" my code is as follows

r = requests.get('url', headers=headers, verify=False)
logger.info(r)

which gives the output data: "xxxxxxxxxxxxxxx" How can i fetch only XXXXXXXXXXXX from this json output ?

user1251007
  • 15,891
  • 14
  • 50
  • 76
poobear
  • 63
  • 11

1 Answers1

0

As simple as this could work for you.

r = requests.get('url', headers=headers, verify=False).json()
print(r['data'])
Rohit
  • 3,659
  • 3
  • 35
  • 57