You are not logged in.

#1 2020-04-26 23:31:00

hhh
Meep!
Registered: 2015-09-17
Posts: 10,179
Website

youtube-dl failure workaround

Using buster, I've had several times in the last few weeks where youtube-dl quit on me with an error message.

The workaround is to delete ~/.cache/youtube-dl and try the download again.

Offline

#2 2020-04-27 01:13:53

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 950

Re: youtube-dl failure workaround

Thanks for the info. I might try to see if the one on my  Sid install works. Perhaps attempt a backport of the Sid one?


Real Men Use Linux

Offline

#3 2020-04-27 03:29:48

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,123
Website

Re: youtube-dl failure workaround

I think youtube-dl is one of the rare cases where it's better to go to the site and download the latest version for yourself. Put the file in ~/bin, don't run it as root and just accept the remaining security issues. Youtube &co change the rules so often that there's no way a Debian package can keep up. Run 'youtube-dl -U' on your local version and usually the latest version (2020.03.24 atm) fixes everything.

The downloaded executable is a binary file which you can't look at in a text editor
but the source code is open and viewable on GitHub: https://github.com/ytdl-org/youtube-dl


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#4 2020-04-27 12:33:47

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,896

Re: youtube-dl failure workaround

To keep it under "some" package control,

pip3 install --user youtube-dl
pip3 install --user --upgrade youtube-dl

etc will install into your home directory. Since youtube-dl releases to pypi regularly, this is also a good way to keep it current (unless you use a rolling distribution). Youtube-dl will then be available in ~/.local/bin as an executable.


Per aspera ad astra.

Online

#5 2020-04-27 14:24:25

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 950

Re: youtube-dl failure workaround

Thanks for the ideas, @johnraff and @twoion. I will look into setting it up the pip3 way so that I can install it  and update like a package.

Last edited by DeepDayze (2020-04-27 14:25:31)


Real Men Use Linux

Offline

#6 2020-04-27 17:29:40

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 538

Re: youtube-dl failure workaround

I think it is good to install virtual environment for python.

https://packaging.python.org/guides/ins … ironments/


// Regards rbh

Offline

#7 2020-04-27 18:32:06

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,896

Re: youtube-dl failure workaround

rbh wrote:

I think it is good to install virtual environment for python.

https://packaging.python.org/guides/ins … ironments/

Yes it would be; though youtube-dl is very special in that it has zero dependencies except for the python stdlib, which makes it easy to manage without. On my servers, all code I write for python, gets its own venv per project. System Python version hell is like DLL hell, but more modern.


Per aspera ad astra.

Online

#8 2020-04-30 06:01:41

ohnonot
...again
Registered: 2015-09-29
Posts: 4,771
Website

Re: youtube-dl failure workaround

johnraff wrote:

I think youtube-dl is one of the rare cases where it's better to go to the site and download the latest version for yourself. Put the file in ~/bin, don't run it as root and just accept the remaining security issues. Youtube &co change the rules so often that there's no way a Debian package can keep up. Run 'youtube-dl -U' on your local version and usually the latest version (2020.03.24 atm) fixes everything.

The downloaded executable is a binary file which you can't look at in a text editor
but the source code is open and viewable on GitHub: https://github.com/ytdl-org/youtube-dl

Easiest solution by far - unless you run Arch big_smile


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

Board footer

Powered by FluxBB