From: Andrew Dolgov Date: Sun, 20 Mar 2016 09:05:23 +0000 (+0300) Subject: af_redditimgur: relax youtube matching a bit X-Git-Tag: 16.3~17 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0a3619649483ae94cdb59f48ebfe7686f3cdbe10;p=tt-rss.git af_redditimgur: relax youtube matching a bit --- 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];