fent / node-ytdl-core

YouTube video downloader in javascript.
MIT License
4.48k stars 790 forks source link

let err = new Miniget.MinigetError(`Status code: ${res.statusCode}`, res.statusCode); #1215

Open edergames29 opened 1 year ago

edergames29 commented 1 year ago

Before creating an issue, please try the following

Otherwise, feel free to open an issue

Include the following if your issue is a bug

MinigetError: Status code: 410 at ClientRequest. (/home/ubuntu/wirebot/node_modules/miniget/dist/index.js:206:27) at Object.onceWrapper (node:events:628:26) at ClientRequest.emit (node:events:513:28) at HTTPParser.parserOnIncomingClient (node:_http_client:701:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) at TLSSocket.socketOnData (node:_http_client:542:22) at TLSSocket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Readable.push (node:internal/streams/readable:234:10) at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) Emitted 'error' event on PassThrough instance at: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { statusCode: 410 }

eugabrielsilva commented 1 year ago

This also happens randomly with me, both errors HTTP 401 and 410, even when using cookies and YouTube ID Token. https://github.com/fent/node-ytdl-core/issues/1205

SiSchu commented 1 year ago

I have the same issue. It somehow works when downgrading to 4.9.x or below

bennymeier commented 1 year ago

I got the same issue. But replacing the old cookie header with the new one from youtube worked, also with the newest ytdl-core version.