switch to innertube API for about channels (#2255)

This commit is contained in:
Émilien Devos
2021-08-13 01:00:26 +02:00
committed by GitHub
parent f2b69fd812
commit 12b46bbd41
6 changed files with 9 additions and 43 deletions

View File

@@ -301,7 +301,6 @@ struct Video
json.field "likeCount", self.likes
json.field "dislikeCount", self.dislikes
json.field "paid", self.paid
json.field "premium", self.premium
json.field "isFamilyFriendly", self.is_family_friendly
json.field "allowedRegions", self.allowed_regions
@@ -693,12 +692,6 @@ struct Video
items
end
def paid
reason = info["playabilityStatus"]?.try &.["reason"]?
paid = reason == "This video requires payment to watch." ? true : false
paid
end
def premium
keywords.includes? "YouTube Red"
end