Search code examples
pythonunirest

mashape python unirest library


I'm trying to use unirest library to run API to dmoz. this is my code:

=========================================================================

import unirest

response = unirest.get("https://enclout-dmoz.p.mashape.com/show.json?auth_token=something&url=www.nike.com",
  headers={
    "X-Mashape-Key": "another_code"
      }
    )
html= response.body()
print html 

but I get an error message: Typeerror the object 'dict' is not callable.


Solution

  • Access the dict without brackets

     html = response.body
     print html