Skip to content

Instantly share code, notes, and snippets.

@SIRHAMY
Created July 19, 2016 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SIRHAMY/20e6fc335191d0e45a7250786f3fe457 to your computer and use it in GitHub Desktop.
Save SIRHAMY/20e6fc335191d0e45a7250786f3fe457 to your computer and use it in GitHub Desktop.
Access keys from requests module's JSON response
import requests
#initial request
r = requests.get(requestUrl)
#Extract JSON
rJson = r.json()
#Get keywords key from response JSON
keywords = rJson.get('keywords')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment