ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.31k stars 10.03k forks source link

Download fails due to not unescaping HTML & #9279

Closed jaens closed 8 years ago

jaens commented 8 years ago

See the URL below, it should use & instead of & in to separate the query parameters:

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--output', u'[%(title)s] %(upload_date)s.%(ext)s', u'--write-info-json', u'--merge-output-format', u'mkv', u'--add-metadata', u'--all-subs', u'--embed-subs', u'--embed-thumbnail', u'--console-title', u'--verbose', u'https://www.destroyallsoftware.com/talks/useing-youre-types-good']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.04.19
[debug] Python version 2.7.10 - Darwin-15.4.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1
[debug] Proxy map: {}
[generic] useing-youre-types-good: Requesting header
WARNING: Falling back on generic information extractor.
[generic] useing-youre-types-good: Downloading webpage
[generic] useing-youre-types-good: Extracting information
[info] Writing video description metadata as JSON to: [Useing You're Type's Good —     Destroy All Software   Talks] NA.info.json
[debug] Invoking downloader on u'https://destroyallsoftware-talks.s3.amazonaws.com/useing-youre-types-good.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIKRVCECXBC4ZGHIQ/20160422/us-east-1/s3/aws4_request&X-Amz-Date=20160422T170348Z&X-Amz-Expires=14400&X-Amz-SignedHeaders=host&X-Amz-Signature=1cb685290a5ef84ea0128c8016b46d7119bc39a3f121816ace75861131660e30'
ERROR: unable to download video data: HTTP Error 400: Bad Request
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1638, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1580, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 350, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 58, in real_download
    data = self.ydl.urlopen(request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1940, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: Bad Request
yan12125 commented 8 years ago

Thanks for the report. URLs will be properly unescaped in the next version.