1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-12 03:24:01 +02:00

fix: various small fixes (#3853)

This commit is contained in:
Dag
2023-12-21 09:24:22 +01:00
committed by GitHub
parent 4c5cf89725
commit f40f997405
5 changed files with 22 additions and 14 deletions

View File

@@ -164,7 +164,11 @@ class YoutubeBridge extends BridgeAbstract
$jsonData = $this->extractJsonFromHtml($html);
// TODO: this method returns only first 100 video items
// if it has more videos, playlistVideoListRenderer will have continuationItemRenderer as last element
$jsonData = $jsonData->contents->twoColumnBrowseResultsRenderer->tabs[0];
$jsonData = $jsonData->contents->twoColumnBrowseResultsRenderer->tabs[0] ?? null;
if (!$jsonData) {
// playlist probably doesnt exists
throw new \Exception('Unable to find playlist: ' . $url_listing);
}
$jsonData = $jsonData->tabRenderer->content->sectionListRenderer->contents[0]->itemSectionRenderer;
$jsonData = $jsonData->contents[0]->playlistVideoListRenderer->contents;
$item_count = count($jsonData);