hmerritt / php-imdb-api

PHP IMDB-API that can fetch film data and search results
Apache License 2.0
59 stars 22 forks source link

No year returned on TV series #6

Closed dhofverberg closed 3 years ago

dhofverberg commented 3 years ago

When searching for a string or requesting information about a specific ID, no year is returned for TV series - only for movies.

For example: $imdb->film('tt3904078', [ 'cache' => false, 'curlHeaders' => ['Accept-Language: en-US,en-GB,en;q=0.9'], 'techSpecs' => false, ]);

returns an array where "year" is blank - only an empty string. There doesn't seem to be any other way of returning the year(s) either, as that information turns up nowhere in the array. Year is however returned successfully on short films and feature films.

Is this a limitation on the data IMDb returns, or is there something you can do to rectify it so that we can find out the year or years of the series?

When looking at IMDb directly (https://www.imdb.com/title/tt3904078/), the year is fully visible - on the page about the series both the start and end year, and on the search results only the start year. So I would assume that at least the starting year should be possible to find out programmatically.