@@ -570,6 +570,10 @@ struct Video
570570 info[" authorThumbnail" ]?.try & .as_s || " "
571571 end
572572
573+ def author_verified : Bool
574+ info[" authorVerified" ].as_bool
575+ end
576+
573577 def sub_count_text : String
574578 info[" subCountText" ]?.try & .as_s || " -"
575579 end
@@ -822,6 +826,7 @@ def parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)?
822826 .try & .dig?(" runs" , 0 )
823827
824828 author = channel_info.try & .dig?(" text" )
829+ authorVerified = channel_info.try & .dig?(" ownerBadges" ) != nil
825830 ucid = channel_info.try { |ci | HelperExtractors .get_browse_id(ci) }
826831
827832 # "4,088,033 views", only available on compact renderer
@@ -845,6 +850,7 @@ def parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)?
845850 " length_seconds" => JSON ::Any .new(length || " 0" ),
846851 " view_count" => JSON ::Any .new(view_count || " 0" ),
847852 " short_view_count" => JSON ::Any .new(short_view_count || " 0" ),
853+ " author_verified" => JSON ::Any .new(authorVerified),
848854 }
849855end
850856
@@ -1037,7 +1043,7 @@ def extract_video_info(video_id : String, proxy_region : String? = nil, context_
10371043
10381044 author_info = video_secondary_renderer.try & .dig?(" owner" , " videoOwnerRenderer" )
10391045 author_thumbnail = author_info.try & .dig?(" thumbnail" , " thumbnails" , 0 , " url" )
1040-
1046+ params[ " authorVerified " ] = JSON :: Any .new(author_info.try & .[ " badges " ]? != nil )
10411047 params[" authorThumbnail" ] = JSON ::Any .new(author_thumbnail.try & .as_s || " " )
10421048
10431049 params[" subCountText" ] = JSON ::Any .new(author_info.try & .[" subscriberCountText" ]?
0 commit comments