0

I have an episode-id and from this I want to derive the series. How can I do that?

This is what I tried:

ia = IMDb()
movie = ia.get_movie(id)
if movie['kind'] == "episode":
    series = movie['episode of']
    print(series)

This gives me only the series title, allthough the documentation says, 'episode of' gives in addition the id of the series.

Rumpumpel
  • 1
  • 2

1 Answers1

0

The series object stored in the 'episode of' key is an instance of the Movie class, so you can access the series ID using:

imdbID = series.movieID

You can also update the information of the Movie instance so that more information (besides title and ID) are collected, with something like:

ia.update(series)
Davide Alberani
  • 1,061
  • 1
  • 18
  • 28