-
-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: parse isLive in CompactVideo #294
Feat: parse isLive in CompactVideo #294
Conversation
in CompactVideo
Using this video https://youtu.be/jfKfPfyJRdk I find that you can consistently find live and non live videos in the watch_next_feed |
Co-authored-by: absidue <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. The only thing I think should be changed here is how the badge renderers are being accessed, they should go through the parser first and only then they should be used.
The Video
node is a good example:
YouTube.js/src/parser/classes/Video.ts
Line 68 in 0fc29f0
this.badges = Parser.parseArray(data.badges, MetadataBadge); |
YouTube.js/src/parser/classes/Video.ts
Lines 97 to 102 in 0fc29f0
get is_live(): boolean { | |
return this.badges.some((badge) => { | |
if (badge.label === 'BADGE_STYLE_TYPE_LIVE_NOW' || badge.style === 'LIVE') | |
return true; | |
}); | |
} |
add is_premiere, is_new, is_fundraiser
…hunkyProgrammer/YouTube.js into feat/parse-isLive-compactVideo
Feat: parse isLive in CompactVideo
Description
This looks for a badge to determine if a CompactVideo is live
Type of change
Checklist: