Closed Brainicism closed 3 months ago
Same here 👋
Did you find a workaround? @Brainicism
You can just provide the default agent when passing in the options
const stream = ytdl(ytdl.getVideoID(req.query.video), {
agent: ytdl.createAgent(),
...
})
I forgot that ytdl-core has a cache system .-. Will fix it when I get home
Describe the bug
getInfo()
callsgetBasicInfo()
But the result of both
getInfo()
andgetBasicInfo()
are cached with the video ID as the cache keyThis causes issues because
getBasicInfo()
performs mutations on the ytdl options passed in by the user. WhengetBasicInfo()
is already cached, it isn't invoked, and the mutations on options are not performed. Some of these mutations includeIn my case, this is causing the default
agent
to be missing.Minimal repro:
Debug File
Environment