Explorar o código

[downloader/external] curl: Add the '--location' flag

curl doesn't follow redirections by default
Jaime Marquínez Ferrándiz %!s(int64=11) %!d(string=hai) anos
pai
achega
163d966707
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      youtube_dl/downloader/external.py

+ 1 - 1
youtube_dl/downloader/external.py

@@ -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')