Open lgbaldoni opened 9 years ago
I am not sure if this helps. I got the same issue when I tried with the URL as below. But it looks like the issue is why I got this URL with that "t=18&" part in it. I could not understand it. But if I remove it, it worked perfect.
$ youtube-dl https://www.youtube.com/watch?t=18&v=elojMnjn4kk
[debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?t=18'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2015.04.09 [debug] Python version 2.7.9 - Linux-3.13.0-27-generic-x86_64-with-debian-jessie-sid [debug] exe versions: avconv 1.2.6-7, avprobe 1.2.6-7, ffmpeg 1.2.6-7, ffprobe 1.2.6-7, rtmpdump 2.4 [debug] Proxy map: {} [generic] watch?t=18: Requesting header [redirect] Following redirect to https://www.youtube.com/supported_browsers?next_url=%2F [download] Downloading playlist: supported_browsers [youtube:user] supported_browsers: Downloading video ids from 1 to 51 ERROR: Unable to download webpage: HTTP Error 400: Bad Request (caused by HTTPError()); >please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type >youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete >output. File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 314, in _request_webpage return self._downloader.urlopen(url_or_request) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1673, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/home/anand/anaconda/lib/python2.7/urllib2.py", line 437, in open response = meth(req, response) File "/home/anand/anaconda/lib/python2.7/urllib2.py", line 550, in http_response 'http', request, response, code, msg, hdrs) File "/home/anand/anaconda/lib/python2.7/urllib2.py", line 475, in error return self._call_chain(_args) File "/home/anand/anaconda/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(_args) File "/home/anand/anaconda/lib/python2.7/urllib2.py", line 558, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
@PyAS you have to escape &
or enclose the whole URL in quotes.
Thanks @dstftw for that. I didn't know this. But when youtube itself did not have it in the original URL, why did I get this modified URL from the same video embedded on a different website? Does it happen because of embedding?