Quellcode durchsuchen

adding support for axel download manager

vijayanand nandam vor 10 Jahren
Ursprung
Commit
e0ac521438
1 geänderte Dateien mit 10 neuen und 0 gelöschten Zeilen
  1. 10 0
      youtube_dl/downloader/external.py

+ 10 - 0
youtube_dl/downloader/external.py

@@ -83,6 +83,16 @@ class CurlFD(ExternalFD):
         return cmd
         return cmd
 
 
 
 
+class AxelFD(ExternalFD):
+    def _make_cmd(self, tmpfilename, info_dict):
+        cmd = [self.exe, '-o', tmpfilename]
+        for key, val in info_dict['http_headers'].items():
+            cmd += ['-H', '%s: %s' % (key, val)]
+        cmd += self._configuration_args()
+        cmd += ['--', info_dict['url']]
+        return cmd
+
+
 class WgetFD(ExternalFD):
 class WgetFD(ExternalFD):
     def _make_cmd(self, tmpfilename, info_dict):
     def _make_cmd(self, tmpfilename, info_dict):
         cmd = [self.exe, '-O', tmpfilename, '-nv', '--no-cookies']
         cmd = [self.exe, '-O', tmpfilename, '-nv', '--no-cookies']