mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 18:14:44 +02:00
fix: various small fixes (#3853)
This commit is contained in:
parent
4c5cf89725
commit
f40f997405
5 changed files with 22 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue