Created
August 23, 2016 06:51
-
-
Save miztiik/e917ceb6e3a2084c6d5954b9bfcfbcc3 to your computer and use it in GitHub Desktop.
AWS Lamda experiment to fetch media metadata from OMDB using their API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def lambda_handler(event, context): | |
import requests, json | |
r = requests.get('http://www.omdbapi.com/?t=titanic&y=1997&plot=short&r=json') | |
mediaMetadata = r.json() | |
print json.dumps( mediaMetadata, indent=4, sort_keys=True ) | |
return {json.dumps( mediaMetadata, indent=4, sort_keys=True )} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment