imdbphp icon indicating copy to clipboard operation
imdbphp copied to clipboard

storyline and country is empty string

Open vlahde opened this issue 3 years ago • 7 comments

storyline() and country() is returning an empty string

vlahde avatar Nov 20 '21 08:11 vlahde

I can confirm country() function does not return empty strings and works perfectly. Perhaps could you provide more specific details (IMDB id of the movie/person, how you use IMDBPHP)?

jcvignoli avatar May 02 '22 20:05 jcvignoli

for me it is working fine since @vlahde reported it so i don't know if there is a real problem here?

@vlahde is this still relevant? If not can this issue be closed as it has no point to keep it open if nobody else has a problem i guess?

duck7000 avatar May 02 '22 21:05 duck7000

I have problem with storyline method Its return empty string

miaadp avatar Aug 03 '22 16:08 miaadp

Mm storyline() is indeed not working but i think that is because the data is not loaded from imdb, see this screenshot. It is a var_dump() from $this->getPage("Title") Storyline data is not loading on my pc

Screenshot_2022-08-03_22-33-07

So i'm not sure there is something wrong with this method

duck7000 avatar Aug 03 '22 20:08 duck7000

That section (and some others further down) are being fetched after the page loads (possibly after you scroll down a bit) from the graphql api: image image

tagline is also broken

tboothman avatar Aug 03 '22 21:08 tboothman

A minimal request (language/location is possibly important)

curl 'https://caching.graphql.imdb.com/?operationName=TMD_Storyline&variables=%7B%22titleId%22%3A%22tt0306414%22%7D&extensions=%7B%22persistedQuery%22%3A%7B%22sha256Hash%22%3A%22cbefc9c4a2dbd0a5583e223e5bc788946016db709a731c85251fc1b1b7a1afbe%22%2C%22version%22%3A1%7D%7D' -H 'content-type: application/json' -H 'x-imdb-user-language: en-GB' -H 'x-imdb-user-country: GB'

The url without escaping: https://caching.graphql.imdb.com/?operationName=TMD_Storyline&variables={"titleId":"tt0306414"}&extensions={"persistedQuery":{"sha256Hash":"cbefc9c4a2dbd0a5583e223e5bc788946016db709a731c85251fc1b1b7a1afbe","version":1}} The extensions bit seems important .. but not sure where the hash comes from at the moment.

tboothman avatar Aug 03 '22 22:08 tboothman

On my pc with adblockers disabled storyline is not loaded anywhere on that page (i use movie 1408 as example)

I didn't change the default language setting of imdbphp so that defaults to US as i remember right? So changing that to GB could help? I will try that.

Edit: tried en-GB, no difference. Default this setting is empty

duck7000 avatar Aug 04 '22 09:08 duck7000

I think this was fixed by https://github.com/tboothman/imdbphp/releases/tag/v7.3.1

tboothman avatar Feb 13 '23 20:02 tboothman