aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rw-r--r--test/parameters.json3
-rw-r--r--youtube_dl/YoutubeDL.py6
-rw-r--r--youtube_dl/__init__.py4
-rw-r--r--youtube_dl/version.py2
5 files changed, 16 insertions, 6 deletions
diff --git a/README.md b/README.md
index af4d969d6..031e436b6 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,8 @@ which means you can modify it, redistribute it or use it however you like.
--no-playlist download only the currently playing video
--age-limit YEARS download only videos suitable for the given age
--download-archive FILE Download only videos not present in the archive
- file. Record all downloaded videos in it.
+ file. Record the IDs of all downloaded videos in
+ it.
## Download Options:
-r, --rate-limit LIMIT maximum download rate in bytes per second (e.g.
@@ -130,8 +131,8 @@ which means you can modify it, redistribute it or use it however you like.
-v, --verbose print various debugging information
--dump-intermediate-pages print downloaded pages to debug problems(very
verbose)
- --write-pages Write downloaded pages to files in the current
- directory
+ --write-pages Write downloaded intermediary pages to files in
+ the current directory to debug problems
## Video Format Options:
-f, --format FORMAT video format code, specify the order of
diff --git a/test/parameters.json b/test/parameters.json
index f042880ed..487a46d56 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.py
index b822930cb..b68b110a4 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,10 @@ 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_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')
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 92e583744..799eca566 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -198,6 +198,9 @@ def parseOpts(overrideArguments=None):
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',
@@ -652,6 +655,7 @@ def _real_main(argv=None):
'cookiefile': opts.cookiefile,
'nocheckcertificate': opts.no_check_certificate,
'proxy': opts.proxy,
+ 'socket_timeout': opts.socket_timeout,
}
with YoutubeDL(ydl_opts) as ydl:
diff --git a/youtube_dl/version.py b/youtube_dl/version.py
index a73d7fb5c..d8f341ab9 100644
--- a/youtube_dl/version.py
+++ b/youtube_dl/version.py
@@ -1,2 +1,2 @@
-__version__ = '2013.11.29'
+__version__ = '2013.12.02'