write_string(u'[debug] Proxy map: ' + compat_str(proxy_map) + u'\n')
def _setup_opener(self):
- timeout = float(self.params.get('socket_timeout', 600))
+ timeout_val = self.params.get('socket_timeout')
+ timeout = 600 if timeout_val is None else float(timeout_val)
+
opts_cookiefile = self.params.get('cookiefile')
opts_proxy = self.params.get('proxy')
general.add_option(
'--no-cache-dir', action='store_const', const=None, dest='cachedir',
help='Disable filesystem caching')
+ general.add_option(
+ '--socket-timeout', dest='socket_timeout',
+ type=float, default=None, help=optparse.SUPPRESS_HELP)
selection.add_option('--playlist-start',
'cookiefile': opts.cookiefile,
'nocheckcertificate': opts.no_check_certificate,
'proxy': opts.proxy,
+ 'socket_timeout': opts.socket_timeout,
}
with YoutubeDL(ydl_opts) as ydl: