Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Error: This video is unavailable #14

Open
bougarfaoui opened this issue Dec 17, 2019 · 10 comments
Open

Error: This video is unavailable #14

bougarfaoui opened this issue Dec 17, 2019 · 10 comments

Comments

@bougarfaoui
Copy link

Hi thanks for this amazing repo, this library works for some video ids but when I used this id : GBfJIxe3vyQ it throws an error.
here's the code :

      ytdl.getInfo('GBfJIxe3vyQ', {}, (err, info) => {
        if (err) {console.warn(err); return;}
        let audioFormats = ytdl.filterFormats(info.formats, 'video');
        ...
      });

here's the error :
[Error: This video is unavailable]

this video id GBfJIxe3vyQ works fine with node-ytdl-core library.

Please someone fix this.

@vht090
Copy link

vht090 commented Dec 21, 2019

  1. at info.js, line 106, edit function parseFormats
    `const parseFormats = (info) => {

const streamingData = info.player_response.streamingData;

const formats = [];

streamingData.adaptiveFormats.map(format => {
const cipher = querystring.parse(format.cipher)
formats.push({
...format,
...cipher
})
})
return formats;
};
2. file util.js, line 36, const getBitrate....., edit to:const getBitrate = (c) => {
if (typeof c.bitrate === 'string') {
let s = c.bitrate.split('-');
return parseFloat(s[s.length - 1], 10);
} else if (typeof c.bitrate === 'number') {
return c.bitrate;
} else {
return 0;
}
};`

@bougarfaoui
Copy link
Author

thanks. I hope someone merge it with the master

@AbelTesfaye
Copy link
Collaborator

Hi @bougarfaoui,

Is this issue fixed in the new release?

@umithyo
Copy link

umithyo commented Jan 1, 2020

The issue seems to persist for me after the update.

@AbelTesfaye
Copy link
Collaborator

The issue seems to persist for me after the update.

I don't understand whats causing this problem. Are you sure the node ytdl library works with the YouTube video id you're testing? (please send the videoId as well so I can debug with it)

@umithyo
Copy link

umithyo commented Jan 5, 2020

The issue seems to persist for me after the update.

I don't understand whats causing this problem. Are you sure the node ytdl library works with the YouTube video id you're testing? (please send the videoId as well so I can debug with it)

Hello, thanks for your reply. It happened with every youtube video the last I tried. I had to start using a different streaming service for the videos.

@AbelTesfaye
Copy link
Collaborator

@umithyo that's strange. Could the issue be with your client-side configurations? Maybe a bad VPN, firewall or proxy setting?

@umithyo
Copy link

umithyo commented Jan 12, 2020

@umithyo that's strange. Could the issue be with your client-side configurations? Maybe a bad VPN, firewall or proxy setting?

I'm sorry for the late reply, I have been using a different video service since I had to fix the problem quickly. It might be a clientside issue, I'm not so sure now. All I know is, it has been working without any problems until the last update.

@we-over-i
Copy link

I'm having the same problem. Surprisingly it only happens when I'm on data. On my home's wifi everything works fine.

@umithyo which service are you using now?

@umithyo
Copy link

umithyo commented May 6, 2020

Hello @we-over-i
My app heavily depended on weekly cycled videos so, admin user inputs a video id on an angular app, I download the video with https://www.npmjs.com/package/ytdl-core on a dedicated server, then fetch the video when in need. It might not be optimal for every system but it fits my need.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants