Created
September 23, 2020 14:31
-
-
Save zakirangwala/dc48c7dcdd7d1354c45387a6ee825581 to your computer and use it in GitHub Desktop.
Tutorial code : Get movie information
This file contains hidden or 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
# Test Movie methods | |
query = "The Karate Kid" | |
moviesDB = imdb.IMDb() | |
movies = moviesDB.search_movie(find_imdb(query)) | |
id = movies[0].getID() | |
score = rotten_tomatoes_score(find_imdb(query)) | |
movie = moviesDB.get_movie(id) | |
title = movie['title'] | |
year = movie['year'] | |
rating = movie['rating'] | |
directors = movie['directors'] | |
casting = movie['cast'] | |
print(f"{title} ({year})\nIMDB Score : {rating} ; Rotten Tomatoes Score : {score}\nDirector(s) : {directors}\nCast : {casting}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment