distubejs / ytdl-core

YouTube video downloader in javascript.
MIT License
261 stars 48 forks source link

MinigetError 403 #55

Closed Lampropoulosss closed 2 months ago

Lampropoulosss commented 2 months ago

Describe the bug

For a lot of videos I get error MinigetError: Status code: 403

Debug FIle

const stream = ytdl(ytdl.getVideoID(req.query.video), {
  filter: "audioonly",
  format: "webm",
  // IPv6Block: "2001:2::/48",
  requestOptions: {
    headers: {
      "User-Agent":
        "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0",
    },
  },
}).on("error", (error) => console.log(error));

return stream.pipe(res, { end: true });

Environment

skick1234 commented 2 months ago

Duplicated of #31