This commit is contained in:
23
imdb_parsen/main.py
Normal file
23
imdb_parsen/main.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# print(the_matrix.get('tech'))
|
||||
from imdb import Cinemagoer
|
||||
|
||||
# create an instance of the Cinemagoer class
|
||||
ia = Cinemagoer()
|
||||
|
||||
# get a movie
|
||||
movie = ia.get_movie('0133093')
|
||||
|
||||
# print the names of the directors of the movie
|
||||
print('Directors:')
|
||||
for director in movie['directors']:
|
||||
print(director['name'])
|
||||
|
||||
# print the genres of the movie
|
||||
print('Genres:')
|
||||
for genre in movie['genres']:
|
||||
print(genre)
|
||||
|
||||
# search for a person name
|
||||
people = ia.search_person('Mel Gibson')
|
||||
for person in people:
|
||||
print(person.personID, person['name'])
|
||||
Reference in New Issue
Block a user