ezoic

Wednesday, July 26, 2017

Python imdb, python rotten tomatoes

python imdb:

https://stackoverflow.com/questions/36513597/how-do-you-request-on-imdb-api-in-python


movies = {}
import json, requests
baseurl = "http://omdbapi.com/?t=" #only submitting the title parameter
with open("movies.txt", "r") as fin:
     for line in fin:
         movieTitle = line.rstrip("\n") # get rid of newline characters
         response = requests.get(url + movieTitle)
         if response.status_code == 200:
              movies[movieTitle] = json.loads(response.text)
         else:
              raise ValueError("Bad request!")
print movies['scream']

import json, requests
url = "http://www.omdbapi.com/?t=scream"
response = requests.get(url)
python_dictionary_values = json.loads(response.text)

python rotten tomatoes:

https://www.blog.pythonlibrary.org/2013/11/06/python-101-how-to-grab-data-from-rottentomatoes/

https://pypi.python.org/pypi/rtsimple








No comments:

Post a Comment

looking for a man

 I am a mid aged woman. I live in southern california.  I was born in 1980. I do not have any kid. no compliacted dating.  I am looking for ...