fent / fent/node-ytdl-core

Caught exception: Error: Video unavailable

Open
#918 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
4.7k
Forks
852
PR merge metrics
No merged PRs in 30d

Description

> Caught exception: Error: Video unavailable

I have no idea why this is happening, I also checked all the issues and no one has had this issue

```
Caught exception: Error: Video unavailable
at Object.exports.playError (Z:\Personal\repos\RedactedProjectName\node_modules\ytdl-core\lib\utils.js:124:12)
at validate (Z:\Personal\repos\RedactedProjectName\node_modules\ytdl-core\lib\info.js:53:25)
at pipeline (Z:\Personal\repos\RedactedProjectName\node_modules\ytdl-core\lib\info.js:175:11)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async exports.getBasicInfo (Z:\Personal\repos\RedactedProjectName\node_modules\ytdl-core\lib\info.js:62:14)
```

this is the code that has been used

> url = the video url
> id = randomly generated id so I can retrieve the video later on (not relevant to the error as it is for file path)
```
var dl = ytdl(url).pipe(fs.createWriteStream(`./videos/${id}.mp4`));
dl.on('finish', () => {
callback( id )
})
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.