I am trying to parse JSON data from a response:
If use my browswer to go to: /url/gold/stuff/here
I get a response in the browser as:
window.data_gold = [{'gold':' room 123' } , {'better gold':'room 1234'} , {"best gold": "in cellar"}];
How can I extract the JSON data out of the response
window.data_gold = json
My code:
import requests,json
url = '/url/gold/stuff/here'
r = requests.get(url,timeout = 30)
newJSON = r.text
The above returns all the text, .json does not work.