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

Can't fetch seasons having more than 50 episodes #482

Open
HalBenHB opened this issue Sep 13, 2023 · 3 comments
Open

Can't fetch seasons having more than 50 episodes #482

HalBenHB opened this issue Sep 13, 2023 · 3 comments

Comments

@HalBenHB
Copy link

Issue description

Here's how IMDB hides when there are more than 50 episodes in a season.

image

ia.update(dragonBall, "episodes"), get_movie_episodes("0121220",1) or ia.update_series_seasons(dragonBall, 1) all return only the first 50 episodes. I've written before in issue#450 about having 50+ may cause the error but now I realized that the reason is because seasons named "unknown". Having more than 50 episodes doesn't directly cause an error, but it prevents pulling the all episodes. However, solving this may be also a workaround for that error since we can manually exclude season named "unknown".

Version of Cinemagoer, Python and OS

NOTICE: please always try the latest version from the repository before submitting a bug.

  • Python: python3-11
  • Cinemagoer: `2023.05.01'
  • OS: Windows 10 10.0.19045'

Steps to reproduce the issue

#!/usr/bin/env python

dragonBall=ia.get_movie("0121220")
ia.update(dragonBall,"episodes")
print(dragonBall["episodes"])

What's the expected result?

Total of 291 episodes listed.

What's the actual result?

{1: {1: <Movie id:0845124[http] title:_"Dragon Ball Z" Mini Gokû wa obotchama! Boku Gohan desu. (1996)_>, 2: <Movie id:0845125[http] title:_"Dragon Ball Z" Shijô saikyô no senshi wa Gokû no ani datta! (1989)_>, 3: <Movie id:0845127[http] title:_"Dragon Ball Z" Yatta! Kore ga chijô saikyô no konbi da! (1989)_>, 4: <Movie id:0843686[http] title:_"Dragon Ball Z" Pikkoro no kirifuda! Gohan wa nakimushi-kun (1989)_>, 5: <Movie id:0847643[http] title:_"Dragon Ball Z" Gokû shisu! Rasuto chansu wa ichido dake (1989)_>, 6: <Movie id:0847644[http] title:_"Dragon Ball Z" Enma-sama mo bikkuri Ano yo de faito (1989)_>, 7: <Movie id:0847637[http] title:_"Dragon Ball Z" Kyôryû to sabaibaru! Gohan no tsurai shugyô (1989)_>, 8: <Movie id:0847635[http] title:_"Dragon Ball Z" Tsuki no kagayaku yoru ni dai henshin! Gohan pawâ no himitsu (1989)_>, 9: <Movie id:0847641[http] title:_"Dragon Ball Z" Gomen ne robotto-san Sabaku ni kieta namida. (1989)_>, 10: <Movie id:0847636[http] title:_"Dragon Ball Z" Naku na Gohan! Hajimete no tatakai (1989)_>, 11: <Movie id:0847640[http] title:_"Dragon Ball Z" Uchû ichi no kyô senshi Saiya-jin mezameru! (1989)_>, 12: <Movie id:0847639[http] title:_"Dragon Ball Z" Hebi no michi de inemuri Gokû ga okkochiru (1989)_>, 13: <Movie id:0847638[http] title:_"Dragon Ball Z" Te o dasu na! Enma-sama no himitsu no kudamono. (1989)_>, 14: <Movie id:0847642[http] title:_"Dragon Ball Z" Ama~i yûwaku! Hebi-hime-sama no omotenashi (1989)_>, 15: <Movie id:0849913[http] title:_"Dragon Ball Z" Pikkoro kara no dasshutsu! Arashi o yobu Gohan (1989)_>, 16: <Movie id:0849914[http] title:_"Dragon Ball Z" Hashire Gohan! Chichi no matsu natsukashi no Paozu-yama (1989)_>, 17: <Movie id:0849917[http] title:_"Dragon Ball Z" Asu naki machi! Shôri e no tôi michinori (1989)_>, 18: <Movie id:0849915[http] title:_"Dragon Ball Z" Shûte~n hebi no michi! Omê Kaiô-sama ka? (1989)_>, 19: <Movie id:0849912[http] title:_"Dragon Ball Z" Jûryoku to no tatakai! Baburusu-kun o tsukamaero (1989)_>, 20: <Movie id:0849916[http] title:_"Dragon Ball Z" Yomigaeru Saiya-jin densetsu! Gokû no rûtsu (1989)_>, 21: <Movie id:0852448[http] title:_"Dragon Ball Z" Ide yo Shenron! Saiya-jin tsui ni chikyû tôchaku (1989)_>, 22: <Movie id:0851653[http] title:_"Dragon Ball Z" N'na baka na! Tsuchi kara umareta Saibaiman (1989)_>, 23: <Movie id:0851659[http] title:_"Dragon Ball Z" Yamucha shisu! Osoru beshi Saibaiman (1989)_>, 24: <Movie id:0851643[http] title:_"Dragon Ball Z" Sayonara Ten-san! Chaozu no sutemi no senpô (1989)_>, 25: <Movie id:0851652[http] title:_"Dragon Ball Z" Tenshinhan zekkyô!! Kore ga saigo no Kikôhô da (1989)_>, 26: <Movie id:0851657[http] title:_"Dragon Ball Z" Hitasura matte 3 jikan! Dangan hikô no Kinto'un (1989)_>, 27: <Movie id:0851646[http] title:_"Dragon Ball Z" Boku ni makasete! Gohan · ikari no dai bakuhatsu (1989)_>, 28: <Movie id:0851656[http] title:_"Dragon Ball Z" Saiya-jin no môi! Kami-sama mo Pikkoro mo shinda (1989)_>, 29: <Movie id:0851658[http] title:_"Dragon Ball Z" Tôsan sugê ya! Kyûkyoku no hissatsuwaza · Kaiô-ken (1989)_>, 30: <Movie id:0851637[http] title:_"Dragon Ball Z" Genkai o koeta atsui tatakai! Gokû tai Bejîta (1989)_>, 31: <Movie id:0851647[http] title:_"Dragon Ball Z" Ima da Gokû! Subete o kaketa saigo no ôwaza (1989)_>, 32: <Movie id:0851640[http] title:_"Dragon Ball Z" Sentô-ryoku 10-bai!! Bejîta dai henshin (1990)_>, 33: <Movie id:0851641[http] title:_"Dragon Ball Z" Shinanaide tôsan!! Kore ga Gohan no sokojikara (1990)_>, 34: <Movie id:0851644[http] title:_"Dragon Ball Z" Ute Kuririn! Negai o kometa Genki-dama (1990)_>, 35: <Movie id:0847263[http] title:_"Dragon Ball Z" Kiseki o okose! Sûpâ Saiya-jin Son Gohan (1990)_>, 36: <Movie id:0852449[http] title:_"Dragon Ball Z" Tobidase uchû e! Kibô no hoshi wa Pikkoro no furusato (1990)_>, 37: <Movie id:0851655[http] title:_"Dragon Ball Z" Nazo no yunzabitto! Kami-Sama no uchûsen o sagase (1990)_>, 38: <Movie id:0852450[http] title:_"Dragon Ball Z" Namekku-sei iki hasshin! Gohan-tachi o matsu kyôfu (1990)_>, 39: <Movie id:0851642[http] title:_"Dragon Ball Z" Teki ka mikata ka? Nazo no kyodai uchûsen no kodomo-tachi (1990)_>, 40: <Movie id:0851649[http] title:_"Dragon Ball Z" Honto ni honto? Are ga kibô no Namekku-sei (1990)_>, 41: <Movie id:0851654[http] title:_"Dragon Ball Z" Shinsetsu na uchû-jin ikinari atta Ûshinchuu (1990)_>, 42: <Movie id:0851648[http] title:_"Dragon Ball Z" Wasusei Furîza No. 79 Fukkatsu no Bejîta!! (1990)_>, 43: <Movie id:0852447[http] title:_"Dragon Ball Z" Sorotta zo Doragon Bôru! Pikkoro-san mo ikikaeru (1990)_>, 44: <Movie id:0854746[http] title:_"Dragon Ball Z" Arata na kyôteki! Uchû no teiyô Furîza (1990)_>, 45: <Movie id:0854748[http] title:_"Dragon Ball Z" Yabô no Bejîta! Uchû ichi no senshi wa ore da!! (1990)_>, 46: <Movie id:0855021[http] title:_"Dragon Ball Z" Gokû pawâ zenkai!! Ginga no hate made 6-kakan (1990)_>, 47: <Movie id:0855017[http] title:_"Dragon Ball Z" Ihyô o tsuita kôgeki!! Chôrô no nerai wa sukautâ (1990)_>, 48: <Movie id:0855019[http] title:_"Dragon Ball Z" Gohan ayaushi! Shi o yobu tsuisekisha Dodoria (1990)_>, 49: <Movie id:0855018[http] title:_"Dragon Ball Z" Bakushi Dodoria! Bejîta no osoru beki shôgekiha (1990)_>, 50: <Movie id:0854757[http] title:_"Dragon Ball Z" Moeru wakusei kara no dasshutsu!! Inochigake no Kamehameha (1990)_>}}

Only first 50 episodes listed.

Additional details

@shwhjw
Copy link

shwhjw commented Oct 4, 2023

I have a similar issue, except I can't get any episodes at all (also tried with DBZ and get different response compared to above).


episodes = ia.get_movie_episodes(code)
print(f"episodes: {episodes}")

episodes: {'data': {'number of episodes': 0}}

ia.update(series, "episodes")
print(f"episodes: {series['episodes']}")

KeyError: 'episodes'

Also tried "number of episodes" as that appears in the Movie class definition but still no luck.

Version: 2023.5.1

@topongo
Copy link

topongo commented Mar 25, 2024

I have a similar issue, except I can't get any episodes at all (also tried with DBZ and get different response compared to above).

i think is more related to #505 and there's a fix almost ready in #503

but concerning the 50 episode limit I think that's a limitation of the imdb website not showing more than 50 elements by default in the gui

edit: i've just seen that @uyar is working on a new version of cinemagoer and it seem that their parser can get more that 50 results, at least by the tests. maybe they can kindly enlight us

@uyar
Copy link
Collaborator

uyar commented Mar 26, 2024

The cinemagoerng package parses the JSON data in that page. I don't remember doing anything about the 50 episode limit. That would mean that the data is there but the HTML is displayed in batches.

I intend to port the JSON-based parsers to cinemagoer but I haven't been able to stabilize the API yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants