Skip to content

Commit

Permalink
Fix #178 - Some movies use roman letters
Browse files Browse the repository at this point in the history
  • Loading branch information
jreklund committed Sep 11, 2019
1 parent 6580316 commit dbc8c80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Imdb/TitleSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function search($searchTerms, $wantedTypes = null, $maxResults = -1)
$page = $this->getPage($searchTerms);

// Parse & filter results
if (preg_match_all('!class="result_text"\s*>\s*<a href="/title/tt(?<imdbid>\d{7,8})/[^>]*>(?<title>.*?)</a>\s*(?:\(in development\))?(?:\((?<year>\d{4})\))?(?<type>[^<]*)!ims',
if (preg_match_all('!class="result_text"\s*>\s*<a href="/title/tt(?<imdbid>\d{7,8})/[^>]*>(?<title>.*?)</a>\s*(?:\(in development\))?(\([XIV]+\)\s*)?(?:\((?<year>\d{4})\))?(?<type>[^<]*)!ims',
$page, $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
$type = $this->parseTitleType($match['type']);
Expand Down

0 comments on commit dbc8c80

Please sign in to comment.