-
-
Notifications
You must be signed in to change notification settings - Fork 314
Description
Steps to reproduce
Steps
const { id } = req.params;
const cookiePath = path.join(process.cwd(), "cookies.txt");
const cookieHeader = parseCookies(cookiePath);
const cachePath = path.join(process.cwd(), ".youtube-search-cache");
if (!existsSync(cachePath))
await mkdir(cachePath, { recursive: true });
const userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36";
const yt = await Innertube.create({
cookie: cookieHeader,
cache: new UniversalCache(true, cachePath),
user_agent: userAgent,
retrieve_player: false,
generate_session_locally: true,
enable_session_cache: true,
device_category: "desktop",
});
const info = await yt.getInfo(id); // ambil metadata
const audioFormat = info.streaming_data?.adaptive_formats?.find(f => f.mime_type.includes("audio/mp4"));
res.status(200).json({ success: true, audioFormat });
Failure Logs
[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<YTNodes.TicketEvent> | 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 (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:140:9)
at createRuntimeClass (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/generator.ts:412:3)
at generateRuntimeClass (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/generator.ts:480:19)
at parseItem (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:553:9)
at Module.parseArray (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:608:22)
at new TwoColumnWatchNextResults (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/classes/TwoColumnWatchNextResults.ts:36:27)
at parseItem (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:577:22)
at parse (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:650:32)
at Module.parseResponse (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:234:20)
at new MediaInfo (file:///F:/Projects/vokal/node_modules/youtubei.js/src/core/mixins/MediaInfo.ts:53:41) {
date: 2025-08-25T13:20:57.098Z,
version: '15.0.1',
info: undefined
}
[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 (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:140:9)
at createRuntimeClass (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/generator.ts:412:3)
at generateRuntimeClass (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/generator.ts:480:19)
at generateRuntimeClass (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/generator.ts:484:5)
at parseItem (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:553:9)
at Module.parseArray (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:608:22)
at new TwoColumnWatchNextResults (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/classes/TwoColumnWatchNextResults.ts:36:27)
at parseItem (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:577:22)
at parse (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:650:32)
at Module.parseResponse (file:///F:/Projects/vokal/node_modules/youtubei.js/src/parser/parser.ts:234:20) {
date: 2025-08-25T13:20:57.119Z,
version: '15.0.1',
info: 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
Not sure
Current behavior
Is this just warning?
Because I still had the result:
{
"success": true,
"audioFormat": {
"itag": 140,
"last_modified": "2025-04-11T07:03:19.842Z",
"last_modified_ms": "1744354999842116",
"content_length": 3083907,
"quality": "tiny",
"projection_type": "RECTANGULAR",
"average_bitrate": 129510,
"bitrate": 130523,
"high_replication": true,
"audio_quality": "AUDIO_QUALITY_MEDIUM",
"approx_duration_ms": 190496,
"audio_sample_rate": 44100,
"audio_channels": 2,
"loudness_db": -0.31000042,
"is_drc": false,
"mime_type": "audio/mp4; codecs="mp4a.40.2"",
"is_type_otf": false,
"init_range": {
"start": 0,
"end": 722
},
"index_range": {
"start": 723,
"end": 994
},
"has_audio": true,
"has_video": false,
"has_text": false,
"language": null,
"is_dubbed": false,
"is_auto_dubbed": false,
"is_descriptive": false,
"is_secondary": false,
"is_original": true
}
}
Version
Default
Anything else?
Anyone?
Checklist
- I am running the latest version.
- I checked the documentation and found no answer.
- I have searched the existing issues and made sure this is not a duplicate.
- I have provided sufficient information.