YT Comments: parse isPinned and strikethroughs (#3626)

このコミットが含まれているのは:
Samantaz Fox 2023-02-10 23:42:04 +01:00
コミット feeb872791
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: F42821059186176E
1個のファイルの変更3行の追加0行の削除

ファイルの表示

@ -181,6 +181,8 @@ def fetch_youtube_comments(id, cursor, format, locale, thin_mode, region, sort_b
json.field "content", html_to_content(content_html)
json.field "contentHtml", content_html
json.field "isPinned", (node_comment["pinnedCommentBadge"]?.try(&.as_bool) == true)
json.field "published", published.to_unix
json.field "publishedText", translate(locale, "`x` ago", recode_date(published, locale))
@ -670,6 +672,7 @@ def content_to_comment_html(content, video_id : String? = "")
end
text = "<b>#{text}</b>" if run["bold"]?
text = "<s>#{text}</s>" if run["strikethrough"]?
text = "<i>#{text}</i>" if run["italics"]?
text