Skip to content

Commit fd05090

Browse files
committed
Remove commas from rating_votes
1 parent 5c7154c commit fd05090

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/HtmlPieces.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function get(object $page, string $element)
5353

5454
case "rating_votes":
5555
$rating_votes = $dom->find($page, '.ratings_wrapper span[itemprop=ratingCount]')->text;
56-
return $this->strClean($rating_votes);
56+
return preg_replace("/[^0-9 ]/", "", $this->strClean($rating_votes));
5757
break;
5858

5959
default:

tests/ImdbTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function testFilm()
1111
$film = $imdb->film('tt0816692');
1212

1313
$this->assertEquals('tt0816692', $film['id']);
14-
$this->assertEquals('Interstellar  ', $film['title']);
14+
$this->assertEquals('Interstellar', $film['title']);
1515
$this->assertEquals('2h 49min', $film['length']);
1616
$this->assertEquals('2014', $film['year']);
1717
}

0 commit comments

Comments
 (0)