diff options
| author | ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2023-02-14 22:52:59 -0500 |
|---|---|---|
| committer | ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> | 2023-02-14 22:52:59 -0500 |
| commit | aecbafbc7beb5c007031c02cfba9f419c58d4545 (patch) | |
| tree | 8f191ce0315e4068fb53464112a862a4308314d3 /src | |
| parent | 8384fa94c2de8c4bf561f4fe5964ce802f22a545 (diff) | |
| download | invidious-aecbafbc7beb5c007031c02cfba9f419c58d4545.tar.gz invidious-aecbafbc7beb5c007031c02cfba9f419c58d4545.tar.bz2 invidious-aecbafbc7beb5c007031c02cfba9f419c58d4545.zip | |
Community: parse replyCount
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/channels/community.cr | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/invidious/channels/community.cr b/src/invidious/channels/community.cr index a0e79c22..9f9f3fde 100644 --- a/src/invidious/channels/community.cr +++ b/src/invidious/channels/community.cr @@ -108,6 +108,8 @@ def fetch_channel_community(ucid, continuation, locale, format, thin_mode) like_count = post["actionButtons"]["commentActionButtonsRenderer"]["likeButton"]["toggleButtonRenderer"]["accessibilityData"]["accessibilityData"]["label"] .try &.as_s.gsub(/\D/, "").to_i? || 0 + reply_count = short_text_to_number(post.dig?("actionButtons", "commentActionButtonsRenderer", "replyButton", "buttonRenderer", "text", "simpleText").try &.as_s || "0") + json.field "content", html_to_content(content_html) json.field "contentHtml", content_html @@ -115,6 +117,7 @@ def fetch_channel_community(ucid, continuation, locale, format, thin_mode) json.field "publishedText", translate(locale, "`x` ago", recode_date(published, locale)) json.field "likeCount", like_count + json.field "replyCount", reply_count json.field "commentId", post["postId"]? || post["commentId"]? || "" json.field "authorIsChannelOwner", post["authorEndpoint"]["browseEndpoint"]["browseId"] == ucid |
