imdbphp
imdbphp copied to clipboard
storyline and country is empty string
storyline() and country() is returning an empty string
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)?
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?
I have problem with storyline method Its return empty string
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
So i'm not sure there is something wrong with this method
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:
tagline is also broken
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.
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
I think this was fixed by https://github.com/tboothman/imdbphp/releases/tag/v7.3.1