I just installed youtube-dl on Linux Mint. I just tried to download a random video but it doesn’t work:
I asked same question on AskUbuntu but later realized that its only for Ubuntu OS
>youtube-dl -F https://www.youtube.com/watch?v=YvydCWM9k0w
[youtube] Setting language
[youtube] YvydCWM9k0w: Downloading video webpage
[youtube] YvydCWM9k0w: Downloading video info webpage
[youtube] YvydCWM9k0w: Extracting video information
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/bin/youtube-dl/__main__.py", line 7, in <module>
File "/usr/bin/youtube-dl/__init__.py", line 536, in main
File "/usr/bin/youtube-dl/__init__.py", line 520, in _real_main
File "/usr/bin/youtube-dl/FileDownloader.py", line 475, in download
File "/usr/bin/youtube-dl/InfoExtractors.py", line 80, in extract
File "/usr/bin/youtube-dl/InfoExtractors.py", line 405, in _real_extract
File "/usr/bin/youtube-dl/InfoExtractors.py", line 405, in <genexpr>
KeyError: 'sig'
So I tried to update youtube-dl..But it didn’t work either
>youtube-dl -U
Updating to latest version...
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/bin/youtube-dl/__main__.py", line 7, in <module>
File "/usr/bin/youtube-dl/__init__.py", line 536, in main
File "/usr/bin/youtube-dl/__init__.py", line 510, in _real_main
File "/usr/bin/youtube-dl/__init__.py", line 55, in updateSelf
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 442, in error
result = self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 629, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
I'm already in super user mode.. Thnx
Your version of youtube-dl is so old that it uses a discontinued updating system. Contact your distribution to ask for a newer version or run the following:
sudo apt-get remove -y youtube-dl
sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl
hash -r
From then on, you'll be able to update youtube-dl independently from your system by typing sudo youtube-dl -U
.