Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help using AKAs / languages #405

Open
Chris230291 opened this issue Sep 22, 2022 · 6 comments
Open

Help using AKAs / languages #405

Chris230291 opened this issue Sep 22, 2022 · 6 comments
Assignees
Labels
bug http parsers of IMDb web pages

Comments

@Chris230291
Copy link

Issue description

Can someone help me figure out where I am going wrong please?
I am trying to translate titles.

Version of Cinemagoer, Python and OS

Name: cinemagoer
Version: 2022.2.11
Summary: Python package to access the IMDb's database
Home-page: https://cinemagoer.github.io/
Author: Davide Alberani
Author-email: da@mimante.net
License: GPL
Location: c:\users\chris\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages
Requires: lxml, SQLAlchemy
Required-by:

Steps to reproduce the issue

import imdb
from imdb import helpers

ia = imdb.Cinemagoer()

movies = ia.search_movie('Tuż przed tragedią')
print(helpers.akasLanguages(movies[0]))

What's the expected result?

I expect to see all of the languages and titles shown here:
https://www.imdb.com/title/tt0462133/releaseinfo

What's the actual result?

Outputs:
[(None, 'Tuż przed tragedią')]

Additional details

Perhaps I am using it wrong?
I want to input a title in whatever language, find the movie/show, then see if the desired output language is in the AKAs.

The example given above is the Polish name of a show. Lets assume I want to translate it to English. I would get Seconds from Disaster

Thanks,
Chris

@alberanid
Copy link
Collaborator

hi,
first of all you have to update the information available for a movie calling the ia.update() method and passing it a Movie instance; in your case with ia.update(movie[0])

In any case, apparently the parser is slightly broken; for your example the return is:

[(None, 'Katasztrófák nyomában (Hungary)'), (None, 'Секунды до катастрофы (Russia)'), (None, 'Segundos catastróficos (Spain)'), (None, 'Sekunden vor dem Unglück (Germany)'), (None, 'Prin tin katastrofi (Greece)')]

it must be fixed.

@alberanid alberanid self-assigned this Dec 8, 2022
@alberanid alberanid added bug http parsers of IMDb web pages labels Dec 8, 2022
@daomengRen
Copy link

ia = Cinemagoer()
result = ia.get_movie('0111161')
print(result)
print(len(akasLanguages(result)))

https://www.imdb.com/title/tt0111161/releaseinfo
It doesn't return all akas, only 5, actually 79

@leodrivera
Copy link

It's because imdb have changed the layout of the site. If you look at its previus version, you'll see that it shows the list "exploded":
https://web.archive.org/web/20221120191839/https://www.imdb.com/title/tt0133093/releaseinfo?ref_=tt_dt_aka

In the current version, it shows the list collapsed:
https://www.imdb.com/title/tt0133093/releaseinfo/?ref_=tt_dt_aka

It also applies to other infos, like "Release Dates"

@alberanid
Is it simple to fix it that so that it "explodes" the list before retrieving it?

@alberanid
Copy link
Collaborator

Is it simple to fix it that so that it "explodes" the list before retrieving it?

It's almost impossible, being an async query.

Other pages had the same fate, but for the moment some old pages are still available with the old "complete" format. Something like "fullcredits" (e.g. https://www.imdb.com/name/nm0000206/fullcredits ) per people.

I doubt that a similar page exists for "release dates", but if someone find it, let us know.

@daomengRen
Copy link

maybe you can take a look at this
https://github.com/Zoha/movier

@drzraf
Copy link
Contributor

drzraf commented Aug 27, 2023

Possibly dup' of #390

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug http parsers of IMDb web pages
Projects
None yet
Development

No branches or pull requests

5 participants