File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,12 @@ public function get(object $page, string $element)
5656 return preg_replace ("/[^0-9 ]/ " , "" , $ this ->strClean ($ rating_votes ));
5757 break ;
5858
59+ case "poster " :
60+ $ poster = $ dom ->find ($ page , '.poster img ' )->src ;
61+ $ poster = preg_match ('/@/ ' , $ poster ) ? preg_split ('~@(?=[^@]*$)~ ' , $ poster )[0 ] . "@.jpg " : $ poster ;
62+ return $ this ->strClean ($ poster );
63+ break ;
64+
5965 default :
6066 return "" ;
6167 }
@@ -65,10 +71,10 @@ public function get(object $page, string $element)
6571 * Cleans-up string
6672 * -> removes white-space and html entitys
6773 *
68- * @param string $string
74+ * @param $string
6975 * @return string
7076 */
71- private function strClean (string $ string )
77+ private function strClean ($ string )
7278 {
7379 return empty ($ string ) ? "" : str_replace (chr (194 ).chr (160 ), '' , html_entity_decode (trim ($ string )));
7480 }
You can’t perform that action at this time.
0 commit comments