mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-22 17:45:40 +03:00
[YoutubeBridge] Fix empty result in search feed (#4098)
This commit is contained in:
parent
d15960f955
commit
f480209825
1 changed files with 1 additions and 8 deletions
|
@ -193,14 +193,7 @@ class YoutubeBridge extends BridgeAbstract
|
|||
$html = $this->fetch($url_listing);
|
||||
$jsonData = $this->extractJsonFromHtml($html);
|
||||
$jsonData = $jsonData->contents->twoColumnSearchResultsRenderer->primaryContents;
|
||||
$jsonData = $jsonData->sectionListRenderer->contents;
|
||||
foreach ($jsonData as $data) {
|
||||
// Search result includes some ads, have to filter them
|
||||
if (isset($data->itemSectionRenderer->contents[0]->videoRenderer)) {
|
||||
$jsonData = $data->itemSectionRenderer->contents;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$jsonData = $jsonData->sectionListRenderer->contents[0]->itemSectionRenderer->contents;
|
||||
$this->fetchItemsFromFromJsonData($jsonData);
|
||||
$this->feeduri = $url_listing;
|
||||
$this->feedName = 'Search: ' . $search;
|
||||
|
|
Loading…
Reference in a new issue