]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[downloader/external] curl: Add the '--location' flag
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 17 Feb 2015 15:21:02 +0000 (16:21 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 17 Feb 2015 15:21:02 +0000 (16:21 +0100)
curl doesn't follow redirections by default

youtube_dl/downloader/external.py

index ff031d2e04253b775e517347866fe3ee75a666c6..51c41c70462674ee3a07aae6f645c06ae7c88c71 100644 (file)
@@ -75,7 +75,7 @@ class ExternalFD(FileDownloader):
 
 class CurlFD(ExternalFD):
     def _make_cmd(self, tmpfilename, info_dict):
-        cmd = [self.exe, '-o', tmpfilename]
+        cmd = [self.exe, '--location', '-o', tmpfilename]
         for key, val in info_dict['http_headers'].items():
             cmd += ['--header', '%s: %s' % (key, val)]
         cmd += self._source_address('--interface')