Fix missing hash key: "toggleButtonRenderer" (issue #3260)

This commit is contained in:
Samantaz Fox 2022-08-15 10:34:52 +02:00
parent 9e58bc19c4
commit b2c0f7efc3
No known key found for this signature in database
GPG Key ID: F42821059186176E
1 changed files with 1 additions and 1 deletions

View File

@ -1012,7 +1012,7 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
if toplevel_buttons
likes_button = toplevel_buttons.as_a
.find(&.dig("toggleButtonRenderer", "defaultIcon", "iconType").as_s.== "LIKE")
.find(&.dig?("toggleButtonRenderer", "defaultIcon", "iconType").=== "LIKE")
.try &.["toggleButtonRenderer"]
if likes_button