tboothman / imdbphp

PHP library for retrieving film and tv information from IMDb
253 stars 84 forks source link

Episode Listing not working #318

Open guardiaopt opened 1 year ago

guardiaopt commented 1 year ago

For the past few days, the episode listing has ceased to function correctly, as observed in this link: https://www.imdb.com/title/tt13833978/. Is anyone else experiencing the same issue?

$imdbObj = new \Imdb\Title(13833978); $episodes = $imdbObj->episodes(); print_r($episodes);

Result: Array ( )

Thomasdouscha commented 1 year ago

I have tried to get it and there is no issue.

guardiaopt @.***>, 4 Ağu 2023 Cum, 14:58 tarihinde şunu yazdı:

For the past few days, the episode listing has ceased to function correctly, as observed in this link: https://www.imdb.com/title/tt13833978/. Is anyone else experiencing the same issue?

— Reply to this email directly, view it on GitHub https://github.com/tboothman/imdbphp/issues/318, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKPFI3CSNM5DB6GQEFEMFSDXTTPU3ANCNFSM6AAAAAA3EDKBGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

guardiaopt commented 1 year ago

My IP is German, but I set the language to English in the settings. Maybe the issue depends on the country I'm in.

$config->language = 'en-US,en';

duck7000 commented 1 year ago

Imdb converted this page to a new layout so episodes() no longer work

mam4dali commented 1 year ago

The issue has been occurring for over a week. This is a new page:

image

HTML source of the new page: new source.txt

mam4dali commented 1 year ago

I found this address to retrieve information, but I'm unsure about its reliability. There's a token inside it, and it might expire after a while: https://www.imdb.com/_next/data/5s-5cAOpj5F5KR73DcheJ/title/tt2560140/episodes.json?season=1&tconst=tt2560140

duck7000 commented 1 year ago

No need for trying to fix this, the only way to fix it is to use GraphQL See #314 If anybody is interested to fix imdphp you may use my code to do so

mam4dali commented 1 year ago

I have made some changes and will test them in the coming days. If everything goes smoothly, I will submit a merge request: https://github.com/mam4dali/imdbphp/commit/74f2036794a183cbeb2b02cba942da37c9ad7c53

Of course, in my opinion, GraphQL is the best approach. I don't have much knowledge about it, but if someone can solve it using that method, we welcome it.

duck7000 commented 1 year ago

@mam4dali that is exactly what i did.. did you read #314?

mam4dali commented 1 year ago

@mam4dali that is exactly what i did.. did you read #314 and checked my repo?

Yes, but I'm not sure if it will merge smoothly with the current repository.

duck7000 commented 1 year ago

Possibly not, you might make some adjustments although it is almost the same But it is a very good starting point and it works great