aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-12-01 11:42:02 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-12-01 11:42:02 +0100
commite344693b65a42436eb40efe85095c01f767a502d (patch)
tree46a4602a1c3a0a737407cf0c91d9ea6ce293b8e1 /youtube_dl/YoutubeDL.py
parent355e4fd07e7f9c0632d9d78415675f8b5cc3c2ce (diff)
downloadyoutube-dl-e344693b65a42436eb40efe85095c01f767a502d.tar.xz
Make socket timeout configurable, and bump default to 10 minutes (#1862)
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rw-r--r--youtube_dl/YoutubeDL.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index b822930cb..b7393fd79 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 certificates
proxy: URL of the proxy server to use
+ socket_timeout: Time to wait for unresponsive hosts, in seconds
The following parameters are not used by YoutubeDL itself, they are used by
the 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')