af_redditimgur: improve youtube detection a bit
This commit is contained in:
parent
88bf000f8d
commit
f7745af952
|
@ -114,8 +114,8 @@ class Af_RedditImgur extends Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
$matches = array();
|
$matches = array();
|
||||||
if (preg_match("/\/\/www\.youtube\.com\/v\/([\w-]+)/", $entry->getAttribute("href"), $matches) ||
|
if (preg_match("/\.youtube\.com\/v\/([\w-]+)/", $entry->getAttribute("href"), $matches) ||
|
||||||
preg_match("/\/\/www\.youtube\.com\/watch\?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)) {
|
preg_match("/\/\/youtu.be\/([\w-]+)/", $entry->getAttribute("href"), $matches)) {
|
||||||
|
|
||||||
$vid_id = $matches[1];
|
$vid_id = $matches[1];
|
||||||
|
|
Loading…
Reference in New Issue