Skip to content

Commit

Permalink
Be more strict when checking for search result being an episode
Browse files Browse the repository at this point in the history
  • Loading branch information
tboothman committed Nov 4, 2015
1 parent 94167f7 commit 172905b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Imdb/TitleSearchAdvanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ protected function parse_results($page) {
$year = $match[1];
$mtype = $match[2] ? : 'Feature Film';
$is_serial = strpos(strtolower($mtype), 'tv series') !== false;
if ($is_serial && strpos($serdet->item($i)->nodeValue, 'Episode') !== false) {
if ($is_serial && strpos($serdet->item($i)->nodeValue, 'Episode:') !== false) {
preg_match('!\((\d{4})\)!', $serdet->item($i)->nodeValue, $match);
$ep_year = $match[1];
$episodeTitleNode = $serdet->item($i)->getElementsByTagName('a')->item(0);
Expand Down

0 comments on commit 172905b

Please sign in to comment.