Quellcode durchsuchen

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

curl doesn't follow redirections by default
Jaime Marquínez Ferrándiz vor 10 Jahren
Ursprung
Commit
163d966707
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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):
 class CurlFD(ExternalFD):
     def _make_cmd(self, tmpfilename, info_dict):
     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():
         for key, val in info_dict['http_headers'].items():
             cmd += ['--header', '%s: %s' % (key, val)]
             cmd += ['--header', '%s: %s' % (key, val)]
         cmd += self._source_address('--interface')
         cmd += self._source_address('--interface')