home       inleiding       sysadmin       services       links       bash       werk       nothing      

Het ging vooral over deze error, na een simpele apt-get install youtube-dl ...
 
$ /usr/bin/youtube-dl https://www.youtube.com/watch?v=3owqvmMf6No -c

[youtube] Setting language
WARNING: unable to set language: <urlopen error [Errno 8] _ssl.c:510: EOF occurred in violation of protocol>
[youtube] 3owqvmMf6No: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 8] _ssl.c:510: EOF occurred in violation of protocol>

Dat werkte dus niet, ook na allerlei oefeningen met python ....
Maar dit werkte wel:
 
$ sudo curl -L https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     3    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     3    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     3    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0   582    0     0    483      0 --:--:--  0:00:01 --:--:--   483
100 1302k  100 1302k    0     0   509k      0  0:00:02  0:00:02 --:--:-- 1149k

Gevolgd door:
 
$ sudo chmod a+rx /usr/local/bin/youtube-dl
 
dan nog een test ....
 
$ /usr/local/bin/youtube-dl https://www.youtube.com/watch?v=3owqvmMf6No

[youtube] 3owqvmMf6No: Downloading webpage
[youtube] 3owqvmMf6No: Downloading video info webpage
[youtube] 3owqvmMf6No: Extracting video information
[youtube] 3owqvmMf6No: Downloading MPD manifest
[download] Destination: How a Hard Drive works in Slow Motion - The Slow Mo Guys-3owqvmMf6No.mp4
[download] 100% of 14.63MiB in 00:00

En tenslotte een rename ...
 
$ mv How\ a\ Hard\ Drive\ works\ in\ Slow\ Motion\ -\ The\ Slow\ Mo\ Guys-3owqvmMf6No.mp4 how-a-hard-drive-works-in-slowmotion.mp4