LuanRT / YouTube.js

A JavaScript client for YouTube's private API, known as InnerTube.
https://ytjs.dev
MIT License
3.55k stars 225 forks source link

Latest virsion as of july 25 2024. #699

Closed wolfles closed 2 months ago

wolfles commented 2 months ago

Steps to reproduce

try to use YouTube to play music and you will get something that says " Failed to extract n-token decipher algorithm" in the logs. I have created new bots try to change code to get a different result. July 22 was the last time it worked, July 24 it didn't work. Between those days I had changed no code or done anything with the bot besides jam out to music. I thought the bot may have gotten banned on YT because their terms of service. So I created a new bot and used the same original code. Same failed to extract.... tried to you links to get anything to play off YT same thing. YT has something that is either blocking it or some update made it no longer work. Or am I just really dumb.

Failure Logs

[YOUTUBEJS][Player]: Failed to extract n-token decipher algorithm
[YOUTUBEJS][Parser]: InnertubeError: TicketShelf not found! This is a bug, want to help us fix it? Follow the instructions at https://github.com/LuanRT/YouTube.js/blob/main/docs/updating-the-parser.md or report it at https://github.com/LuanRT/YouTube.js/issues! Introspected and JIT generated this class in the meantime: class TicketShelf extends YTNode { static type = 'TicketShelf'; title: string; events: ObservedArray | null; upcoming_title: string; show_more: string; show_less: string; information_text: string; use_calendar_avatar: boolean; constructor(data: RawNode) { super(); this.title = data.title; this.events = Parser.parse(data.events, true, YTNodes.TicketEvent); this.upcoming_title = data.upcomingTitle; this.show_more = data.showMore; this.show_less = data.showLess; this.information_text = data.informationText; this.use_calendar_avatar = data.useCalendarAvatar; } } at ERROR_HANDLER (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13129:30) at createRuntimeClass (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:12298:3) at generateRuntimeClass (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:12341:19) at parseItem (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13433:75) at Object.parseArray (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13475:22) at new TwoColumnWatchNextResults (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:11666:35) at parseItem (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13455:22) at parse (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13503:32) at Object.parseResponse (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13207:20) at new MediaInfo (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13893:144) { date: 2024-07-25T05:36:01.314Z, version: '10.1.0' }
[YOUTUBEJS][Parser]: InnertubeError: TicketEvent not found! This is a bug, want to help us fix it? Follow the instructions at https://github.com/LuanRT/YouTube.js/blob/main/docs/updating-the-parser.md or report it at https://github.com/LuanRT/YouTube.js/issues! Introspected and JIT generated this class in the meantime: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; } } at ERROR_HANDLER (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13129:30) at createRuntimeClass (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:12298:3) at generateRuntimeClass (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:12341:19) at generateRuntimeClass (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:12344:5) at parseItem (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13433:75) at Object.parseArray (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13475:22) at new TwoColumnWatchNextResults (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:11666:35) at parseItem (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13455:22) at parse (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13503:32) at Object.parseResponse (D:\SteamLibrary\steamapps\common\Bot Maker For Discord\node_modules\youtubei.js\bundle\node.cjs:13207:20) { date: 2024-07-25T05:36:01.487Z, version: '10.1.0' }
[YOUTUBEJS][Parser]: TicketEvent changed! The following keys where altered: title The class has changed to: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; title?: string; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; this.title = Reflect.has(data, 'title') ? data.title : undefined; } }
[YOUTUBEJS][Parser]: TicketEvent changed! The following keys where altered: title The class has changed to: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; title?: string; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; this.title = Reflect.has(data, 'title') ? data.title : undefined; } }
[YOUTUBEJS][Parser]: TicketEvent changed! The following keys where altered: title The class has changed to: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; title?: string; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; this.title = Reflect.has(data, 'title') ? data.title : undefined; } } [YOUTUBEJS][Parser]: TicketEvent changed! The following keys where altered: title The class has changed to: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; title?: string; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; this.title = Reflect.has(data, 'title') ? data.title : undefined; } }
[YOUTUBEJS][Parser]: TicketEvent changed! The following keys where altered: title The class has changed to: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; title?: string; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; this.title = Reflect.has(data, 'title') ? data.title : undefined; } } [YOUTUBEJS][Parser]: TicketEvent changed! The following keys where altered: title The class has changed to: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; title?: string; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; this.title = Reflect.has(data, 'title') ? data.title : undefined; } }
[YOUTUBEJS][Parser]: TicketEvent changed! The following keys where altered: title The class has changed to: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; title?: string; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; this.title = Reflect.has(data, 'title') ? data.title : undefined; } } [YOUTUBEJS][Parser]: TicketEvent changed! The following keys where altered: title The class has changed to: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; title?: string; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; this.title = Reflect.has(data, 'title') ? data.title : undefined; } }
[YOUTUBEJS][Parser]: TicketEvent changed! The following keys where altered: title The class has changed to: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; title?: string; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; this.title = Reflect.has(data, 'title') ? data.title : undefined; } } [YOUTUBEJS][Parser]: TicketEvent changed! The following keys where altered: title The class has changed to: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; title?: string; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; this.title = Reflect.has(data, 'title') ? data.title : undefined; } }
[YOUTUBEJS][Parser]: TicketEvent changed! The following keys where altered: title The class has changed to: class TicketEvent extends YTNode { static type = 'TicketEvent'; time_month: string; time_day: string; link_text: string; button_text: string; endpoint: NavigationEndpoint; subtitle1: string; subtitle2: string; time_date: string; time_time: string; time_weekday: string; button_accessibility_text: string; has_multiple_offers: boolean; title?: string; constructor(data: RawNode) { super(); this.time_month = data.timeMonth; this.time_day = data.timeDay; this.link_text = data.linkText; this.button_text = data.buttonText; this.endpoint = new NavigationEndpoint(data.buttonCommand); this.subtitle1 = data.subtitle1; this.subtitle2 = data.subtitle2; this.time_date = data.timeDate; this.time_time = data.timeTime; this.time_weekday = data.timeWeekday; this.button_accessibility_text = data.buttonAccessibilityText; this.has_multiple_offers = data.hasMultipleOffers; this.title = Reflect.has(data, 'title') ? data.title : undefined; } }

Expected behavior

Music or selected links to play the audio.

Current behavior

Nothing, no audio or anything. Other commands still work like they should/are intended to just anything with audio on the YT side doesn't.

Version

Default

Anything else?

No response

Checklist

LuanRT commented 2 months ago

https://github.com/LuanRT/YouTube.js/pull/688