Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MinigetError: Status code: 573 #1278

Open
itsaqib96 opened this issue Mar 7, 2024 · 2 comments
Open

MinigetError: Status code: 573 #1278

itsaqib96 opened this issue Mar 7, 2024 · 2 comments

Comments

@itsaqib96
Copy link

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));
      });
@itsaqib96
Copy link
Author

@fent Can you please look into this?

@rogerpadilla
Copy link

The status code 573 might be a custom code implemented by your proxy server. Some proxies or web servers use non-standard status codes for specific internal purposes or to communicate unique errors.

A misconfiguration in your proxy settings or a network issue might lead to this unconventional status code being returned.

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

No branches or pull requests

2 participants