1
0
Fork 0
forked from blallo/rss-bridge

[YoutubeBridge] Skip unavailable videos

This commit is contained in:
logmanoriginal 2018-02-16 22:11:03 +01:00
parent ef402bb5c3
commit 5aaab9eb8c

View file

@ -50,6 +50,12 @@ class YoutubeBridge extends BridgeAbstract {
private function ytBridgeQueryVideoInfo($vid, &$author, &$desc, &$time){ private function ytBridgeQueryVideoInfo($vid, &$author, &$desc, &$time){
$html = $this->ytGetSimpleHTMLDOM(self::URI . "watch?v=$vid"); $html = $this->ytGetSimpleHTMLDOM(self::URI . "watch?v=$vid");
// Skip unavailable videos
if(!strpos($html->innertext, 'IS_UNAVAILABLE_PAGE')){
return;
}
$author = $html->innertext; $author = $html->innertext;
$author = substr($author, strpos($author, '"author=') + 8); $author = substr($author, strpos($author, '"author=') + 8);
$author = substr($author, 0, strpos($author, '\u0026')); $author = substr($author, 0, strpos($author, '\u0026'));