Skip to content

Instantly share code, notes, and snippets.

@zakirangwala
Created September 23, 2020 14:31
Show Gist options
  • Save zakirangwala/dc48c7dcdd7d1354c45387a6ee825581 to your computer and use it in GitHub Desktop.
Save zakirangwala/dc48c7dcdd7d1354c45387a6ee825581 to your computer and use it in GitHub Desktop.
Tutorial code : Get movie information
# 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