youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 8c80603f1adea843d96c0598b902106c7a3efb7f
parent 37b239b3b66ea9e2a71bae41e9da6dba8ee5554c
Author: Sergey M․ <dstftw@gmail.com>
Date:   Sat, 23 Feb 2019 00:58:56 +0700

[downloader/external] Add support for rate limit and retries for wget

Diffstat:
Myoutube_dl/downloader/external.py | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py @@ -164,6 +164,12 @@ class WgetFD(ExternalFD): cmd = [self.exe, '-O', tmpfilename, '-nv', '--no-cookies'] for key, val in info_dict['http_headers'].items(): cmd += ['--header', '%s: %s' % (key, val)] + cmd += self._option('--limit-rate', 'ratelimit') + retry = self._option('--tries', 'retries') + if len(retry) == 2: + if retry[1] in ('inf', 'infinite'): + retry[1] = '0' + cmd += retry cmd += self._option('--bind-address', 'source_address') cmd += self._option('--proxy', 'proxy') cmd += self._valueless_option('--no-check-certificate', 'nocheckcertificate')