diff --git a/bridges/RutubeBridge.php b/bridges/RutubeBridge.php index 10fa58c5e2d..c1ba67c9440 100644 --- a/bridges/RutubeBridge.php +++ b/bridges/RutubeBridge.php @@ -85,9 +85,17 @@ private function getVideosFromReduxState() $reduxState = $this->getJSONData($html); $videos = []; if ($this->getInput('c')) { - $videosMethod = 'allVideos(' . $this->getInput('c') . ',)'; + $videosMethod1 = 'allVideos(' . $this->getInput('c') . ',)'; + $videosMethod2 = 'videos(' . $this->getInput('c') . ',)'; + if (isset($reduxState->api->queries->$videosMethod1)) { + $videos = $reduxState->api->queries->$videosMethod1->data->results; + } else { + // Fallback to other method + // No idea what is difference between "allVideos" and "videos" + // Introduced while resolving https://github.com/RSS-Bridge/rss-bridge/issues/4716 + $videos = $reduxState->api->queries->$videosMethod2->data->results; + } $channelInfoMethod = 'channelInfo({"userChannelId":' . $this->getInput('c') . '})'; - $videos = $reduxState->api->queries->$videosMethod->data->results; $this->title = $reduxState->api->queries->$channelInfoMethod->data->name; } elseif ($this->getInput('p')) { $playListVideosMethod = 'getPlaylistVideos(' . $this->getInput('p') . ')';