From 0a3619649483ae94cdb59f48ebfe7686f3cdbe10 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 20 Mar 2016 12:05:23 +0300 Subject: [PATCH] af_redditimgur: relax youtube matching a bit --- plugins/af_redditimgur/init.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index c481ab5b..5e9d9f7c 100755 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -154,9 +154,9 @@ class Af_RedditImgur extends Plugin { } $matches = array(); - if (preg_match("/\.youtube\.com\/v\/([\w-]+)/", $entry->getAttribute("href"), $matches) || - preg_match("/\.youtube\.com\/.*?[\&\?]v=([\w-]+)/", $entry->getAttribute("href"), $matches) || - preg_match("/\.youtube\.com\/watch\?v=([\w-]+)/", $entry->getAttribute("href"), $matches) || + if (preg_match("/youtube\.com\/v\/([\w-]+)/", $entry->getAttribute("href"), $matches) || + preg_match("/youtube\.com\/.*?[\&\?]v=([\w-]+)/", $entry->getAttribute("href"), $matches) || + preg_match("/youtube\.com\/watch\?v=([\w-]+)/", $entry->getAttribute("href"), $matches) || preg_match("/\/\/youtu.be\/([\w-]+)/", $entry->getAttribute("href"), $matches)) { $vid_id = $matches[1]; -- 2.39.5