fent / node-ytdl-core

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

Error in audio stream for xxxx: MinigetError: Status code: 403 #1267

Open timfong888 opened 9 months ago

timfong888 commented 9 months ago

Before creating an issue, please try the following

Otherwise, feel free to open an issue

ytdl-core@4.11.5

DEFAULT 2023-12-16T18:36:01.748133Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] Error in audio stream for jzh3KGq4tqg: MinigetError: Status code: 403 DEFAULT 2023-12-16T18:36:01.748156Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at ClientRequest. (/workspace/node_modules/miniget/dist/index.js:206:27) DEFAULT 2023-12-16T18:36:01.748163Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at Object.onceWrapper (node:events:632:26) DEFAULT 2023-12-16T18:36:01.748169Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at ClientRequest.emit (node:events:517:28) DEFAULT 2023-12-16T18:36:01.748176Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at ClientRequest.emit (node:domain:552:15) DEFAULT 2023-12-16T18:36:01.748184Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:700:27) DEFAULT 2023-12-16T18:36:01.748190Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) DEFAULT 2023-12-16T18:36:01.748197Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at TLSSocket.socketOnData (node:_http_client:541:22) DEFAULT 2023-12-16T18:36:01.748202Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at TLSSocket.emit (node:events:517:28) DEFAULT 2023-12-16T18:36:01.748210Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at TLSSocket.emit (node:domain:552:15) DEFAULT 2023-12-16T18:36:01.748216Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] at addChunk (node:internal/streams/readable:335:12) { DEFAULT 2023-12-16T18:36:01.748222Z [resource.labels.functionName: videoIdToMP4] [labels.executionId: tnjyy3mq12vd] statusCode: 403

// const audioStream = ytdl(videoUrl, { quality: lowestQualityFormat.itag });
        const audioStream = ytdl(videoUrl, { quality: lowestQualityFormat.itag, requestOptions: { agent: agent } });

        const firebaseStream = file.createWriteStream({
            metadata: {
                contentType: lowestQualityFormat.mimeType,
            },
        });
timfong888 commented 9 months ago

Note: I set up a proxy and used the URL of the proxy along with username and password, but I still get this issue.

Keito-Klein commented 4 months ago

Any solution to fix this error?

I tried use this package and got error InputStreamError: MinigetError: status code 403