]> git.wh0rd.org - tt-rss.git/commitdiff
af_redditimgur: improve youtube detection a bit
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Tue, 7 Jul 2015 11:21:13 +0000 (14:21 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Tue, 7 Jul 2015 11:22:58 +0000 (14:22 +0300)
plugins/af_redditimgur/init.php

index 265999e2ba8e3ff83d368c4dfe9172ba7c0a690d..3b37c0a719256f8b5033eb6a5cd1e896d60e2ae6 100644 (file)
@@ -114,8 +114,8 @@ class Af_RedditImgur extends Plugin {
                                }
 
                                $matches = array();
-                               if (preg_match("/\/\/www\.youtube\.com\/v\/([\w-]+)/", $entry->getAttribute("href"), $matches) ||
-                                       preg_match("/\/\/www\.youtube\.com\/watch\?v=([\w-]+)/", $entry->getAttribute("href"), $matches) ||
+                               if (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];