mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-03 18:40:17 +01:00
Make socket timeout configurable, and bump default to 10 minutes (#1862)
This commit is contained in:
parent
355e4fd07e
commit
e344693b65
@ -39,5 +39,6 @@
|
|||||||
"writeinfojson": true,
|
"writeinfojson": true,
|
||||||
"writesubtitles": false,
|
"writesubtitles": false,
|
||||||
"allsubtitles": false,
|
"allsubtitles": false,
|
||||||
"listssubtitles": false
|
"listssubtitles": false,
|
||||||
|
"socket_timeout": 20
|
||||||
}
|
}
|
||||||
|
@ -132,6 +132,7 @@ class YoutubeDL(object):
|
|||||||
cookiefile: File name where cookies should be read from and dumped to.
|
cookiefile: File name where cookies should be read from and dumped to.
|
||||||
nocheckcertificate:Do not verify SSL certificates
|
nocheckcertificate:Do not verify SSL certificates
|
||||||
proxy: URL of the proxy server to use
|
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 following parameters are not used by YoutubeDL itself, they are used by
|
||||||
the FileDownloader:
|
the FileDownloader:
|
||||||
@ -969,7 +970,8 @@ def print_debug_header(self):
|
|||||||
proxy_map.update(handler.proxies)
|
proxy_map.update(handler.proxies)
|
||||||
write_string(u'[debug] Proxy map: ' + compat_str(proxy_map) + u'\n')
|
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_cookiefile = self.params.get('cookiefile')
|
||||||
opts_proxy = self.params.get('proxy')
|
opts_proxy = self.params.get('proxy')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user