Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: unable to download video data: HTTP Error 400: Bad Request #5297

Open
lgbaldoni opened this issue Mar 27, 2015 · 3 comments
Open

ERROR: unable to download video data: HTTP Error 400: Bad Request #5297

lgbaldoni opened this issue Mar 27, 2015 · 3 comments

Comments

@lgbaldoni
Copy link

@lgbaldoni lgbaldoni commented Mar 27, 2015

youtube-dl -v https://www.youtube.com/watch?v=sc03SlMY3vA
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=sc03SlMY3vA']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.03.24
[debug] Python version 2.7.8 - Linux-3.16.7-7-desktop-x86_64-with-SuSE-13.2-x86_64
[debug] exe versions: ffmpeg 2.6.1, ffprobe 2.6.1
[debug] Proxy map: {}
[youtube] sc03SlMY3vA: Downloading webpage
[youtube] sc03SlMY3vA: Extracting video information
[youtube] sc03SlMY3vA: Downloading formats manifest
[youtube] sc03SlMY3vA: Downloading DASH manifest
[debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/webvtt/id/sc03SlMY3vA.2/itag/92/source/yt_live_broadcast/playlist_type/LIVE/gcr/it/pmbypass/yes/ratebypass/yes/cmbypass/yes/live/1/lang/en/sver/3/fexp/900239,900720,901809,902904,907263,916730,934954,9406986,9407103,948124,948703,951511,951703,952612,955100,957201,961404,961406/signature/516D6F0A9A262DF75D41B8036DF218FC3C7361D9.0167894D26CF5171FE9D0AE97E56AEDF375275CD/upn/_Ixu0cIss-Q/key/dg_yt0/ip/95.246.55.64/ipbits/0/expire/1427466972/sparams/ip,ipbits,expire,id,itag,source,playlist_type,gcr,pmbypass,ratebypass,cmbypass,live,lang'
ERROR: unable to download video data: HTTP Error 400: Bad Request
Traceback (most recent call last):
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1379, in process_info
success = dl(filename, info_dict)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1354, in dl
return fd.download(name, info)
File "/usr/bin/youtube-dl/youtube_dl/downloader/common.py", line 341, in download
return self.real_download(filename, info_dict)
File "/usr/bin/youtube-dl/youtube_dl/downloader/http.py", line 64, in real_download
data = self.ydl.urlopen(request)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1673, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib64/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 448, in error
return self._call_chain(_args)
File "/usr/lib64/python2.7/urllib2.py", line 382, in _call_chain
result = func(_args)
File "/usr/lib64/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: Bad Request

@suranands
Copy link

@suranands suranands commented Apr 16, 2015

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)

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 16, 2015

@Pyas you have to escape & or enclose the whole URL in quotes.

@suranands
Copy link

@suranands suranands commented Apr 17, 2015

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.