[YoutubeBridge] Fix empty result in search feed (#4098)
This commit is contained in:
parent
d15960f955
commit
f480209825
@ -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…
x
Reference in New Issue
Block a user