ytdl-js / react-native-ytdl

A YouTube downloader for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

403 response, result of consent screen

Orawko opened this issue · comments

I would like to use some youtube video in my app, but when I run:

const youtubeURL = 'http://www.youtube.com/watch?v=04GiqLjRO3A';
const urls = await ytdl(youtubeURL, { quality: 'highestaudio' });
console.log(urls)

I recieve 403 network error, and following warning:

Possible Unhandled Promise Rejection (id: 0): TypeError: Cannot read property 'storyboards' of undefined TypeError: Cannot read property 'storyboards' of undefined at Object.exports.getStoryboards

Week or two earlier, I used that without any problems. Maybe something has changed on the youtube site.

Edit:
When I paste that url to safari on simulator, I can see youtube consent screen. As I have found, It is shown to some European countries (in my case Poland)

This problem has been resolved in the latest version v4.8.2

Just need to reinstall the package

yarn upgrade react-native-ytdl@latest

The Youtube consent screen is not a problem.

@Darguima Thank You for the response! After updating to mentioned version, problem is gone and video loads succesfully (maybe slightly longer than earlier)