Invidious is an alternative front-end to YouTube
Update '/api/v1/popular'
Omar Roth9ce02e579d8f
diff --git a/src/invidious.cr b/src/invidious.crindex cd1da476..5fa57ea4 100644--- a/src/invidious.cr+++ b/src/invidious.cr@@ -2617,20 +2617,13 @@ get "/api/v1/popular" do |env|generate_thumbnails(json, video.id)end- json.field "lengthSeconds", video.info["length_seconds"].to_i- json.field "viewCount", video.views+ json.field "lengthSeconds", video.length_secondsjson.field "author", video.authorjson.field "authorId", video.ucidjson.field "authorUrl", "/channel/#{video.ucid}"json.field "published", video.published.to_unixjson.field "publishedText", "#{recode_date(video.published)} ago"-- description = video.description.gsub("<br>", "\n")- description = description.gsub("<br/>", "\n")- description = XML.parse_html(description)- json.field "description", description.content- json.field "descriptionHtml", video.descriptionendendend