mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-11 09:02:28 +02:00
[YoutubeBridge] Fix issues loading playlists
Videos that are part of a playlist have the playlist ID encoded in the URI. When loading the video info the page contents change unex- pectedly due to the playlist being part of the page. This removes any trailing parameters from the video ID in order to ensure only pure videos are loaded at all times.
This commit is contained in:
@ -102,6 +102,7 @@ class YoutubeBridge extends BridgeAbstract {
|
||||
$desc = '';
|
||||
$time = 0;
|
||||
$vid = str_replace('/watch?v=', '', $element->find('a', 0)->href);
|
||||
$vid = substr($vid, 0, strpos($vid, '&') ?: strlen($vid));
|
||||
$title = $this->ytBridgeFixTitle($element->find($title_selector, 0)->plaintext);
|
||||
if($title != '[Private Video]') {
|
||||
$this->ytBridgeQueryVideoInfo($vid, $author, $desc, $time);
|
||||
|
Reference in New Issue
Block a user