1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-22 16:13:35 +02:00

fix: various small fixes (#3578)

This commit is contained in:
Dag
2023-07-29 00:14:30 +02:00
committed by GitHub
parent 11ce8b5dcd
commit 701fe3cfed
13 changed files with 87 additions and 39 deletions

View File

@@ -78,19 +78,27 @@ class YouTubeCommunityTabBridge extends BridgeAbstract
returnServerError('Channel does not have a community tab');
}
foreach ($this->getCommunityPosts($json) as $key => $post) {
$posts = $this->getCommunityPosts($json);
foreach ($posts as $key => $post) {
$this->itemTitle = '';
if (!isset($post->backstagePostThreadRenderer)) {
continue;
}
$details = $post->backstagePostThreadRenderer->post->backstagePostRenderer;
if (isset($post->backstagePostThreadRenderer->post->backstagePostRenderer)) {
$details = $post->backstagePostThreadRenderer->post->backstagePostRenderer;
} elseif (isset($post->backstagePostThreadRenderer->post->sharedPostRenderer)) {
// todo: properly extract data from this shared post
$details = $post->backstagePostThreadRenderer->post->sharedPostRenderer;
} else {
continue;
}
$item = [];
$item['uri'] = self::URI . '/post/' . $details->postId;
$item['author'] = $details->authorText->runs[0]->text;
$item['content'] = '';
$item['author'] = $details->authorText->runs[0]->text ?? null;
$item['content'] = $item['uri'];
if (isset($details->contentText->runs)) {
$text = $this->getText($details->contentText->runs);