Rudloff / alltube

Web GUI for youtube-dl
GNU General Public License v3.0
2.94k stars 584 forks source link

Alltube Download from YouTube fails #349

Closed inimaga closed 3 years ago

inimaga commented 3 years ago

Alltube Download from YouTube fails

Please answer these questions when reporting a new issue:

What is your operating system (Windows, Linux, OSX, etc.)? Linux What is your web server (Apache, IIS, etc.)? Apache

What version of AllTube are you using? The latest version

How did you install AllTube (with Git or with a release package)? On Heroku, following instruction in the Read me file

What version of PHP are you using? N/A

What version of Python are you using? N/A

What version of youtube-dl are you using? N/A

Do you get any PHP-related errors in your webserver's logs? N/A

What is the content of your config/config.yml file? N/A

Please provide the URL of a video that causes the issue.

Describe your issue

Alltube Download from YouTube is currently displayes the following error message whenever you try to launch a download.

'/app/.heroku/python/bin/python' 'vendor/ytdl-org/youtube-dl/youtube_dl/__main__.py' '--no-warnings' '--ignore-errors' '--flat-playlist' '--restrict-filenames' '--no-playlist' '--dump-single-json' 'https://www.youtube.com/watch?v=uGm4UVWicv0' '-f' 'best[protocol=https]/best[protocol=http]/bestvideo[protocol=https]/bestvideo[protocol=http]' failed with this error:
ERROR: uGm4UVWicv0: YouTube said: Unable to extract video data

To recreate issue, simply visit https://alltubedownload.net, and try downloading a video. After googling the issue, I believe its due to the new cookie consent page served for users accessing youtube from European countries. More info here: https://github.com/ytdl-org/youtube-dl/issues/28604 and https://github.com/ytdl-org/youtube-dl/issues/28602.

Suggested fix: Updating the ytdl version to the latest release should fix the issue. It seemed to have fixed the problem for others who where having similar issues. (https://forum.cloudron.io/topic/3878/alltube-download-from-youtube-fails/9). In the future, I wish to be more helpful by sending in pull request with the update to latest ytdl version. But I have no idea how the update is done. Perhaps a mini-documentation covering this process in the FAQ?

Thanks in advance.

Rudloff commented 3 years ago

Thanks for the report. I can reproduce the error and upgrading youtube-dl to the latest version does inded fix it.

But I have no idea how the update is done.

We use Composer to install youtube-dl, so the version has to be updated in composer.json. For example: https://github.com/Rudloff/alltube/commit/b902c9027b1d5e850afc63de4f0754ccad74358e

For people that don't want to use the version packaged with AllTube, it is also possible to install youtube-dl with another method and then set the youtubedl option in config.yml to use the new youtube-dl. (This is what Cloudron does.)