Typo: missing '?' when looking for key in dislikes_button

Co-authored-by: Matthew McGarvey <matthewmcgarvey14@gmail.com>
This commit is contained in:
Samantaz Fox 2021-11-28 23:37:27 +01:00 committed by GitHub
parent ceb1feb350
commit 91f8395222
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -914,7 +914,7 @@ def extract_video_info(video_id : String, proxy_region : String? = nil, context_
.try &.["toggleButtonRenderer"]
if dislikes_button
dislikes_txt = (dislikes_button["defaultText"] || dislikes_button["toggledText"]?)
dislikes_txt = (dislikes_button["defaultText"]? || dislikes_button["toggledText"]?)
.try &.dig?("accessibility", "accessibilityData", "label")
dislikes = dislikes_txt.as_s.gsub(/\D/, "").to_i64? if dislikes_txt