1
0
Fork 0
forked from blallo/rss-bridge

Merge pull request #250 from teromene/youtube-fix

Fix the doubled HTTPS.
This commit is contained in:
Mitsu 2016-05-01 20:59:12 +02:00
commit 832c503278

View file

@ -91,7 +91,7 @@ class YoutubeBridge extends BridgeAbstract {
$videoquery = parse_url($element->find('a',0)->href, PHP_URL_QUERY); parse_str($videoquery, $videoquery); $videoquery = parse_url($element->find('a',0)->href, PHP_URL_QUERY); parse_str($videoquery, $videoquery);
$item->id = $videoquery['v']; $item->id = $videoquery['v'];
$item->uri = 'https://www.youtube.com/watch?v='.$item->id; $item->uri = 'https://www.youtube.com/watch?v='.$item->id;
$item->thumbnailUri = 'https:'.$element->find('img',0)->src; $item->thumbnailUri = $element->find('img',0)->src;
$item->title = trim($element->find('h3',0)->plaintext); $item->title = trim($element->find('h3',0)->plaintext);
$item->timestamp = getPublishDate($item->id); $item->timestamp = getPublishDate($item->id);
$item->content = '<a href="' . $item->uri . '"><img src="' . $item->thumbnailUri . '" /></a><br><a href="' . $item->uri . '">' . $item->title . '</a>'; $item->content = '<a href="' . $item->uri . '"><img src="' . $item->thumbnailUri . '" /></a><br><a href="' . $item->uri . '">' . $item->title . '</a>';
@ -111,7 +111,7 @@ class YoutubeBridge extends BridgeAbstract {
$videoquery = parse_url($element->find('a',0)->href, PHP_URL_QUERY); parse_str($videoquery, $videoquery); $videoquery = parse_url($element->find('a',0)->href, PHP_URL_QUERY); parse_str($videoquery, $videoquery);
$item->id = $videoquery['v']; $item->id = $videoquery['v'];
$item->uri = 'https://www.youtube.com/watch?v='.$item->id; $item->uri = 'https://www.youtube.com/watch?v='.$item->id;
$item->thumbnailUri = 'https:'.$element->find('img',0)->src; $item->thumbnailUri = $element->find('img',0)->src;
$item->title = trim($element->find('h3',0)->plaintext); $item->title = trim($element->find('h3',0)->plaintext);
$item->timestamp = getPublishDate($item->id); $item->timestamp = getPublishDate($item->id);
$item->content = '<a href="' . $item->uri . '"><img src="' . $item->thumbnailUri . '" /></a><br><a href="' . $item->uri . '">' . $item->title . '</a>'; $item->content = '<a href="' . $item->uri . '"><img src="' . $item->thumbnailUri . '" /></a><br><a href="' . $item->uri . '">' . $item->title . '</a>';