]> git.wh0rd.org Git - tt-rss.git/commitdiff
af_redditimgur: relax youtube matching a bit
authorAndrew Dolgov <noreply@fakecake.org>
Sun, 20 Mar 2016 09:05:23 +0000 (12:05 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Sun, 20 Mar 2016 09:05:23 +0000 (12:05 +0300)
plugins/af_redditimgur/init.php

index c481ab5b3dc1191bb489a06b1a2ade11f685b5cf..5e9d9f7c83e3c6601058f76eb8778d308fbb7bf6 100755 (executable)
@@ -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];