A feature-rich command-line audio/video downloader
Make socket timeout configurable, and bump default to 10 minutes (#1862)
Philipp Hagemeistere344693b65a4
diff --git a/test/parameters.json b/test/parameters.jsonindex f042880edb..487a46d566 100644--- a/test/parameters.json+++ b/test/parameters.json@@ -39,5 +39,6 @@"writeinfojson": true,"writesubtitles": false,"allsubtitles": false,- "listssubtitles": false+ "listssubtitles": false,+ "socket_timeout": 20}diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.pyindex b822930cbe..b7393fd798 100644--- a/youtube_dl/YoutubeDL.py+++ b/youtube_dl/YoutubeDL.py@@ -132,6 +132,7 @@ class YoutubeDL(object):cookiefile: File name where cookies should be read from and dumped to.nocheckcertificate:Do not verify SSL certificatesproxy: URL of the proxy server to use+ socket_timeout: Time to wait for unresponsive hosts, in secondsThe following parameters are not used by YoutubeDL itself, they are used bythe FileDownloader:@@ -969,7 +970,8 @@ class YoutubeDL(object):proxy_map.update(handler.proxies)write_string(u'[debug] Proxy map: ' + compat_str(proxy_map) + u'\n')- def _setup_opener(self, timeout=20):+ def _setup_opener(self):+ timeout = float(self.params.get('socket_timeout', 600))opts_cookiefile = self.params.get('cookiefile')opts_proxy = self.params.get('proxy')