Added verification badge to video player and error with related_videos

This commit is contained in:
jonas-w
2022-02-03 23:18:50 +01:00
parent 154bca4635
commit 1fee636afa
3 changed files with 10 additions and 4 deletions

View File

@@ -63,7 +63,7 @@ def get_about_info(ucid, locale) : AboutChannel
author_thumbnail = initdata["metadata"]["channelMetadataRenderer"]["avatar"]["thumbnails"][0]["url"].as_s
ucid = initdata["metadata"]["channelMetadataRenderer"]["externalId"].as_s
# Raises a KeyError on failure.
banners = initdata["header"]["c4TabbedHeaderRenderer"]?.try &.["banner"]?.try &.["thumbnails"]?
banner = banners.try &.[-1]?.try &.["url"].as_s?
@@ -73,7 +73,7 @@ def get_about_info(ucid, locale) : AboutChannel
# end
badges = initdata["header"]["c4TabbedHeaderRenderer"]?.try &.["badges"]?
if !badges.nil?
verified=true
verified = true
end
description = initdata["metadata"]["channelMetadataRenderer"]?.try &.["description"]?.try &.as_s? || ""
description_html = HTML.escape(description)