imdbpy

USA 'aka Title' returned as default?


Trying to get the Title for "Blood Oath" from 1990 https://www.imdb.com/title/tt0100414/ .In this example am using Jupyter, but it works the same in my .py program:

movie = ia.get_movie('0100414')
movie
<Movie id:0100414[http] title:_Prisoners of the Sun (1990)_>

Am I doing something wrong? This seems to be the 'USA aka' title. I do know how to get the AKA titles back via the API, but just puzzled as to why it's returning this one. On the IMDB web page "Blood Oath" is listed - under the AKA section - as the "(original title)". Thank you.


Solution

  • What you do is correct.

    IMDbPY takes the movie title from the value of a meta tag with property set to "og:title". So, what's considered the title of a movie depends on the decisions made by IMDb.

    You can also use "original title" key, that is taken from what it's actually shown to the reader of the web page. This, however, is even more subject to change since it's usually shown in the language guessed by the IMDb web servers using the language set by a registered user, the settings of your browser or by geolocation of the IP.

    So, for example, for that title I get "Blood Oath" via browser since my browser is set to English and "Giuramento di sangue (1990)" if I access movie['original title'] (geolocation of my IP, I guess)

    To conclude, if you really need another title, you may get the whole list this way:

    ia.update(movie, 'release info')
    print(movie.get('akas from release info'))
    

    You will get a list that you can parse looking for a string ending in '(original title)'

    (disclaimer: I'm one of the main authors of IMDbPY)