Closed paxter closed 5 years ago
Thanks for the report. A fix have been submitted into the branch master.
Does this fix also need to be applied to TitleSearch.php? Using 6.1.3 release, I get these results:
$s = "Four Weddings and a Funeral";
$search = new \Imdb\TitleSearch();
$results = $search->search($s, array(\Imdb\TitleSearch::MOVIE));
foreach ($results as $r)
printf("IMDB=%s TITLE=%s TYPE=%s\n", $r->imdbid(), $r->title(), $r->movietype());
IMDB=0109831 TITLE=Four Weddings and a Funeral TYPE=Movie
IMDB=7587362 TITLE=Four Weddings and a Funeral TYPE=Movie
IMDB=8363230 TITLE=Episode #1.7 TYPE=Movie
IMDB=8363234 TITLE=Episode #1.8 TYPE=Movie
IMDB=8363236 TITLE=Episode #1.9 TYPE=Movie
IMDB=8363226 TITLE=Episode #1.5 TYPE=Movie
IMDB=2570292 TITLE=Du Bunui Gyulhonsikgwa Han Bunui Jangryesik TYPE=Movie
IMDB=8363220 TITLE=Episode #1.2 TYPE=Movie
IMDB=8363244 TITLE=Episode #1.11 TYPE=Movie
IMDB=8363224 TITLE=Episode #1.4 TYPE=Movie
IMDB=8363218 TITLE=Episode #1.1 TYPE=Movie
IMDB=8363238 TITLE=Episode #1.10 TYPE=Movie
IMDB=8363242 TITLE=Episode #1.12 TYPE=Movie
IMDB=8363222 TITLE=Episode #1.3 TYPE=Movie
IMDB=8363228 TITLE=Episode #1.6 TYPE=Movie
This requires a different type of fix (new regex) and better tests, as they didn't detect this. Will write the tests later.
!class="result_text"\s*>\s*<a href="/title/tt(?<imdbid>\d{7})/[^>]*>(?<title>.*?)</a>\s*(?:\(in development\))?(?:\((?<year>\d{4})\))?(?<type>[^<]*)!ims
For https://www.imdb.com/title/tt7587362/ movietype() returns "Movie" instead of "Series".