I have this:
import pycurl
import pprint
import json
c = pycurl.Curl()
c.setopt(c.URL, 'https://mydomainname.com')
c.perform()
the above code return a dictionary like this:
{"name":"steve", "lastvisit":"10-02-2012", "age":12}
I want to loop through that dictionary and get just the age:
age : 12
I tried:
diction = {}
diction = c.perform()
pprint.pprint(diction["age"])
No data returned and I got this error:
TypeError: 'NoneType' object is unsubscriptable