Skip to content

Conversation

@trevin-j
Copy link

@trevin-j trevin-j commented Nov 6, 2025

TLDR; the only way to fix the downloader is to upgrade youtubei.js to version 16 and specify a js interpreter.

As this comment says, the current hardcoded player id (from #3973) doesn't work anymore. At the moment, the downloader plugin won't work.

I upgraded youtubei.js to version 16, added in the snippet shown here (specifying a js interpreter), and got the downloads to work again.

Changes:

  • Remove hard-coded player_id
    • The specific player_id is blocked now
  • Update youtubei.js dependency to version 16 (fixes download issues)
  • Specify js interpreter for sig function stuff

* Remove hard-coded player_id
  * The specific player_id is blocked now
* Update youtubei.js dependency to version 16 (fixes download issues)
* Specify js interpreter for sig function stuff
);
const ffmpegMutex = new Mutex();

Platform.shim.eval = async (data: Types.BuildScriptResult, env: Record<string, Types.VMPrimative>) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Replace data:·Types.BuildScriptResult,·env:·Record<string,·Types.VMPrimative> with ⏎··data:·Types.BuildScriptResult,⏎··env:·Record<string,·Types.VMPrimative>,⏎

Suggested change
Platform.shim.eval = async (data: Types.BuildScriptResult, env: Record<string, Types.VMPrimative>) => {
Platform.shim.eval = async (
data: Types.BuildScriptResult,
env: Record<string, Types.VMPrimative>,
) => {

);
const ffmpegMutex = new Mutex();

Platform.shim.eval = async (data: Types.BuildScriptResult, env: Record<string, Types.VMPrimative>) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <@typescript-eslint/require-await> reported by reviewdog 🐶
Async arrow function has no 'await' expression.

Platform.shim.eval = async (data: Types.BuildScriptResult, env: Record<string, Types.VMPrimative>) => {
const properties = [];

if(env.n) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ·

Suggested change
if(env.n) {
if (env.n) {

const properties = [];

if(env.n) {
properties.push(`n: exportedVars.nFunction("${env.n}")`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ;

Suggested change
properties.push(`n: exportedVars.nFunction("${env.n}")`)
properties.push(`n: exportedVars.nFunction("${env.n}")`);

const properties = [];

if(env.n) {
properties.push(`n: exportedVars.nFunction("${env.n}")`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <stylistic/semi> reported by reviewdog 🐶
Missing semicolon.

Suggested change
properties.push(`n: exportedVars.nFunction("${env.n}")`)
properties.push(`n: exportedVars.nFunction("${env.n}")`);


const code = `${data.output}\nreturn { ${properties.join(', ')} }`;

return new Function(code)();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <@typescript-eslint/no-unsafe-return> reported by reviewdog 🐶
Unsafe return of a value of type any.


const code = `${data.output}\nreturn { ${properties.join(', ')} }`;

return new Function(code)();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <@typescript-eslint/no-implied-eval> reported by reviewdog 🐶
Implied eval. Do not use the Function constructor to create functions.


const code = `${data.output}\nreturn { ${properties.join(', ')} }`;

return new Function(code)();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <@typescript-eslint/no-unsafe-call> reported by reviewdog 🐶
Unsafe call of a(n) Function typed value.

const code = `${data.output}\nreturn { ${properties.join(', ')} }`;

return new Function(code)();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ;

Suggested change
}
};

const code = `${data.output}\nreturn { ${properties.join(', ')} }`;

return new Function(code)();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <stylistic/semi> reported by reviewdog 🐶
Missing semicolon.

Suggested change
}
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant