Browse Source

af_redditimgur: improve youtube detection a bit

Andrew Dolgov 4 years ago
parent
commit
f7745af952
1 changed files with 2 additions and 2 deletions
  1. 2 2
      plugins/af_redditimgur/init.php

+ 2 - 2
plugins/af_redditimgur/init.php

@@ -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];