Skip to content

Commit

Permalink
Use dig to get properties
Browse files Browse the repository at this point in the history
Co-authored-by: Samantaz Fox <[email protected]>
  • Loading branch information
ChunkyProgrammer and SamantazFox committed Aug 13, 2024
1 parent 96ade64 commit e31053e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/invidious/channels/about.cr
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def get_about_info(ucid, locale) : AboutChannel
if ageGate = initdata.dig?("contents", "twoColumnBrowseResultsRenderer", "tabs", 0, "tabRenderer", "content", "sectionListRenderer", "contents", 0, "channelAgeGateRenderer")
description_node = nil
author = ageGate["channelTitle"].as_s
ucid = initdata["responseContext"]["serviceTrackingParams"][0]["params"][0]["value"].as_s
author_url = "https://www.youtube.com/channel/" + ucid
author_thumbnail = ageGate["avatar"]["thumbnails"][0]["url"].as_s
ucid = initdata.dig("responseContext", "serviceTrackingParams", 0, "params", 0, "value").as_s
author_url = "https://www.youtube.com/channel/#{ucid}"
author_thumbnail = ageGate.dig("avatar", "thumbnails", 0, "url").as_s
banner = nil
is_family_friendly = false
is_age_gated = true
Expand Down

0 comments on commit e31053e

Please sign in to comment.