diff --git a/engines/invidious/video.php b/engines/invidious/video.php index 97cca8a1..735ca2e8 100644 --- a/engines/invidious/video.php +++ b/engines/invidious/video.php @@ -50,7 +50,7 @@ public static function print_results($results, $opts) { $uploader = $result["uploader"] ?? ''; $views = $result["views"] ?? ''; $date = $result["date"] ?? ''; - $thumbnail = preg_replace('/(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?v=([^\s]+)/', 'https://i.ytimg.com/vi/$1/maxresdefault.jpg', $url) ?? ''; + $thumbnail = "https://i.ytimg.com/vi/" . htmlspecialchars(explode("=", $url)[1]) . "/maxresdefault.jpg" ?? ''; echo "
"; echo "";