MinigetError: Status code: 573
itsaqib96 opened this issue · comments
Muhammad Aqib commented
I didn't find about this error on the whole internet.
I am trying to use proxy and getting this error.
MinigetError: Status code: 573
at ClientRequest.<anonymous> (G:\ytdl\s1\node_modules\miniget\dist\index.js:206:27)
at Object.onceWrapper (node:events:629:26)
at ClientRequest.emit (node:events:514:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
at Socket.socketOnData (node:_http_client:535:22)
at Socket.emit (node:events:514:28)
at addChunk (node:internal/streams/readable:545:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:495:3)
at Readable.push (node:internal/streams/readable:375:5) {
statusCode: 573
}
Here is my code setup
import { HttpProxyAgent } from 'http-proxy-agent';
const agent = new HttpProxyAgent('http://user:pass@128.68.123.192:3389');
const videoInfo = await ytdl.getInfo(url, {requestOptions: {agent}});
const videoFormat = ytdl.chooseFormat(videoInfo.formats, {
quality: 140,
});
return new Promise((resolve, reject) => {
ytdl(url, {requestOptions: {agent, format: videoFormat}})
.pipe(fs.createWriteStream(videOutputPath))
.on("finish", () =>
resolve({
videOutputPath,
})
)
.on("error", (error) => reject(error));
});
Muhammad Aqib commented
@fent Can you please look into this?