Skip to content

Instantly share code, notes, and snippets.

@philips
Last active December 13, 2015 23:38
Show Gist options
  • Save philips/4992678 to your computer and use it in GitHub Desktop.
Save philips/4992678 to your computer and use it in GitHub Desktop.
import requests
response = requests.get("http://odata.netflix.com/Catalog/People?$filter=Name%20eq%20'James%20Cameron'&$expand=Awards,TitlesDirected&$format=json")
a = response.json()
a['d'].keys()
a['d']['results'][0]['TitlesDirected']
a['d']['results'][0]['TitlesDirected']['results'][17]
movies = a['d']['results'][0]['TitlesDirected']['results']
for movie in movies:
print movie['Name']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment