imdbphp icon indicating copy to clipboard operation
imdbphp copied to clipboard

Languages are not fetched correctly

Open koichirose opened this issue 1 year ago • 3 comments

Description

Languages are not fetched anymore since a few weeks ago

Movies / TV-Shows / Person

All movies, haven't tried tv shows

Type

Bug

Code

$languages = $imdb_movie->languages();

Expected Results / What do you want to do?

It should return a list of languages

Actual Results / What is happening?

It returns an empty array

koichirose avatar Nov 12 '24 09:11 koichirose

I wouldn't bother to add issues to this version as it seems abandoned.

If you want a working version with GraphQL check out my repo here https://github.com/duck7000/imdbGraphQLPHP

And for the record this isn't a cry/try to lurk people to my github, i'm just trying to help to get a working version.

duck7000 avatar Nov 12 '24 16:11 duck7000

The fix is very simple. In file src/Imdb/Title.php edit line 657 and add a forward slash after title:

                '!href="/search/title/\?.+?primary_language=([^&]*)[^>]*>\s*(.*?)\s*</a>(\s+\((.*?)\)|)!m',

AnonTester avatar Nov 17 '24 13:11 AnonTester

The fix is very simple. In file src/Imdb/Title.php edit line 657 and add a forward slash after title:

                '!href="/search/title/\?.+?primary_language=([^&]*)[^>]*>\s*(.*?)\s*</a>(\s+\((.*?)\)|)!m',

Thanks! It's working.

XaXo81 avatar Jan 08 '25 07:01 XaXo81