import unirest
import json
response = unirest.post("https://andruxnet-random-famous-quotes.p.mashape.com/?cat=famous",
headers={
"X-Mashape-Key": "uukT9yvCgjmshXoCpkrCUNaZs3O0p1EwwkQjsnnudFw0VyeJVe",
"Content-Type": "application/x-www-form-urlencoded",
"Accept": "application/json"
}
)
print response.body
will return
{u'category': u'Famous', u'quote': u'Facts are the enemy of truth.', u'author': u"Don Quixote 'Man of La Mancha'"}
I'm trying to parse this to state
Facts are the enemy of truth - Don Quixote
but I can't work out how to parse the JSON. I'm not asking for someone to do it for me, but does anyone know which arguments or tools to use? Thanks