Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-22 Thread mason
> I did upgrade to a newer version of the Linux kernel since I last tried.  
Maybe that helped somehow?


I see no way in which the kernel version could make a difference here.

> Some of the comments here suggest that the problem is youtube-dl running  
with Python2, instead of Python3.


You can check whether or not this is the case.  Run

$ which youtube-dl

to determine the path of the executable (probably /usr/bin/youtube-dl) and  
open that file in a text editor.
 If the first line is "#!/usr/bin/python3" or "#!/usr/bin/env python3" then  
that means that when executed youtube-dl will be run with Python 3.  If you  
see "python" instead of "python3" then it will default to Python 2, and  
you'll need to either edit this line or explicitly run youtube-dl with  
python3.


In Debian and derivatives, /usr/bin/python is a symlink to /usr/bin/python2,  
so package maintainers make sure that programs requiring Python 3 explictly  
call python3.  You would only run into a problem when installing youtube-dl  
from a source other than the Trisquel repository. Eventually this will no  
longer be an issue.  Debian 11 will not package python2, so from that point  
on "python" will unambigiously refer to "python3" (at least until there's a  
python4 to worry about).


> Perhaps the Trisquel devs backport the latest versions?

IIRC the last time youtube-dl stopped working in Trisquel I did backport a  
newer version that worked, but no one has taken on the task of backporting  
each new version as it comes out or automating the process of doing so, which  
is what it would take to ensure that Trisquel's youtube-dl package always  
works.


Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-22 Thread strypey
Youtube-dl is now working again. I didn't follow any of the newer  
instructions above. But if I remember rightly, I did upgrade to a newer  
version of the Linux kernel since I last tried. Maybe that helped somehow?


Centurino
> The situation wouldn't be much better on other fixed-release distros, even  
those that are currently up-to-date.


Doesn't that depend on the cause of the problem? Some of the comments here  
suggest that the problem is youtube-dl running with Python2, instead of  
Python3. Since the EoL was announced for Python2 some time ago, I presume  
distros maintainers would have ensured that they shipped Python3 in newer  
versions, and made it the default version that Python programs use.


> They will quickly fall behind in their versions of youtube-dl and  
incompatibilities between the script and site APIs will surface.


That's not been my experience with youtube-dl on Flidas. Apart from this  
recent hiccup, it has always worked fine on YT or Invidious instances, as  
mentioned in the OP. Perhaps the Trisquel devs backport the latest versions?


Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-22 Thread centurino84
> So, would it be fair to say that this is another case of poor old Flidas  
showing it's age?


The situation wouldn't be much better on other fixed-release distros, even  
those that are currently up-to-date. They will quickly fall behind in their  
versions of youtube-dl and incompatibilities between the script and site APIs  
will surface. It's just a piece of software for which freezing doesn't work  
because it has to constantly keep up to date with numerous independent web  
services. Like I said, it's better for you to download it directly from the  
developers using the instructions on their website, that way you can always  
update it to the newest version.


Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-22 Thread Yoni Rabkin
vas19...@ya.ru writes:

> Why did you call python3 with youtube-dl?

Many issues reported about youtube-dl have their fix related to using
python3.

-- 
   "Cut your own wood and it will warm you twice"


Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-22 Thread strypey
So, would it be fair to say that this is another case of poor old Flidas  
showing it's age? I'm really looking forward to Etiona being released. Maybe  
I'll try youtube-dl on my test install of that.


Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-22 Thread vas1980i

Why did you call python3 with youtube-dl?


Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-21 Thread J.B. Nicholson

stry...@disintermedia.net.nz wrote:
Youtube-dl has always worked reliably on my Flidas systems. But in the last few days 
I noticed it failing to download videos from YT.


You don't say what version of youtube-dl you're running, but this version:

$ youtube-dl --version
2020.05.08

works fine to download https://www.youtube.com/watch?v=O3YP1TU-L_8

Perhaps you could download youtube-dl separately, chmod 700 that file, and run it (or 
update it then run it) to see if a later version would help you?


Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-21 Thread centurino84
You are right, I did not know that. I have only been using Trisquel for 2  
weeks or so and I assumed that it's an option based on the output of  
youtube-dl. Still, there is a chance that OP installed pip from some  
third-party source and then youtube-dl through it, so I'll leave that post as  
it is.


Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-21 Thread Yoni Rabkin
centurin...@protonmail.com writes:

> Did you install youtube-dl with pip or apt? I'd really recommend
> against using apt because the version in the repositories is really
> outdated and that's not good considering how often Google updates the
> API. If you installed it through pip, you can run:
>
> sudo pip install --upgrade youtube_dl

I don't think flidas has pip.

-- 
   "Cut your own wood and it will warm you twice"


Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-21 Thread centurino84
Did you install youtube-dl with pip or apt? I'd really recommend against  
using apt because the version in the repositories is really outdated and  
that's not good considering how often Google updates the API. If you  
installed it through pip, you can run:


sudo pip install --upgrade youtube_dl

If you installed it through apt, you can run:

sudo apt remove youtube-dl

and follow the instructions at  
https://ytdl-org.github.io/youtube-dl/download.html, that is


sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O  
/usr/local/bin/youtube-dl


sudo chmod a+rx /usr/local/bin/youtube-dl

Then you'll be able to update simply with sudo youtube-dl -U


Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-21 Thread Yoni Rabkin
stry...@disintermedia.net.nz writes:

> Thanks for the tip but it didn't work for me. Here's the output:
>
> strypey@Bishop:~$ sudo youtube-dl -U && python3 'which youtube-dl'
> "https://www.youtube.com/watch?v=O3YP1TU-L_8;
> [sudo] password for strypey:
> It looks like you installed youtube-dl with a package manager, pip,
> setup.py or a tarball. Please use that to update.
> python3: can't open file 'which youtube-dl': [Errno 2] No such file or
> directory

I would suggest trying to download an updated youtube-dl manually,
installing python3, and try to use python3 to run it as above, just to
see if that solves your issue.

I've been using this method for a long time now to see videos from
youtube when people send me links. I've noticed that without regularly
updating youtube-dl and without python3, I often would get errors.

-- 
   "Cut your own wood and it will warm you twice"


Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-20 Thread strypey

Thanks for the tip but it didn't work for me. Here's the output:

strypey@Bishop:~$ sudo youtube-dl -U && python3 'which youtube-dl'  
"https://www.youtube.com/watch?v=O3YP1TU-L_8;

[sudo] password for strypey:
It looks like you installed youtube-dl with a package manager, pip, setup.py  
or a tarball. Please use that to update.
python3: can't open file 'which youtube-dl': [Errno 2] No such file or  
directory




Re: [Trisquel-users] Youtube-dl failing to download on Flidas

2020-05-20 Thread Yoni Rabkin


stry...@disintermedia.net.nz writes:

> Youtube-dl has always worked reliably on my Flidas systems. But in the
> last few days I noticed it failing to download videos from YT.
>
> Here's the terminal output:
>
> strypey@Bishop:~$ youtube-dl https://yewtu.be/watch?v=O3YP1TU-L_8
> [generic] watch?v=O3YP1TU-L_8: Requesting header
> WARNING: Could not send HEAD request to
> https://yewtu.be/watch?v=O3YP1TU-L_8: HTTP Error 503: Service
> Unavailable
> [generic] watch?v=O3YP1TU-L_8: Downloading webpage
> ERROR: Unable to download webpage: HTTP Error 503: Service Unavailable
> (caused by HTTPError()); please report this issue on
> https://yt-dl.org/bug . Make sure you are using the latest version;
> see  https://yt-dl.org/update  on how to update. Be sure to call
> youtube-dl with the --verbose flag and include its complete output.
> strypey@Bishop:~$ youtube-dl https://www.youtube.com/watch?v=O3YP1TU-L_8
> [youtube] O3YP1TU-L_8: Downloading webpage
> [youtube] O3YP1TU-L_8: Downloading video info webpage
> ERROR: O3YP1TU-L_8: YouTube said: This video is unavailable.
> strypey@Bishop:~$
>
> Yet I am watching this video using Invidio.us right now.

I'm on flidas as well. It works here after updating youtube-dl and by
calling python3:

sudo youtube-dl -U && python3 `which youtube-dl` 
"https://www.youtube.com/watch?v=O3YP1TU-L_8;

-- 
   "Cut your own wood and it will warm you twice"