]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[downloader/http] Add ability to pass downloader options via info dict
authorSergey M․ <dstftw@gmail.com>
Sun, 4 Feb 2018 00:16:22 +0000 (07:16 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 4 Feb 2018 00:16:22 +0000 (07:16 +0700)
youtube_dl/downloader/http.py
youtube_dl/extractor/common.py

index 6b4122f8ded84e7c3f632471537f5a511eb62a85..b60a750ca43c9c4582e8646392ed772f6c7b362e 100644 (file)
@@ -45,6 +45,7 @@ class HttpFD(FileDownloader):
 
         is_test = self.params.get('test', False)
         chunk_size = self._TEST_FILE_SIZE if is_test else (
+            info_dict.get('downloader_options', {}).get('http_chunk_size') or
             self.params.get('http_chunk_size') or 0)
 
         ctx.open_mode = 'wb'
index deafb48508fc7a0def88e5bd23fab558d37d8213..988fc15ff2c0c0fdbb3c3ae55e72d69c09d239a3 100644 (file)
@@ -174,6 +174,8 @@ class InfoExtractor(object):
                                  width : height ratio as float.
                     * no_resume  The server does not support resuming the
                                  (HTTP or RTMP) download. Boolean.
+                    * downloader_options  A dictionary of downloader options as
+                                 described in FileDownloader
 
     url:            Final video URL.
     ext:            Video filename extension.