release 2014.01.05.4
[youtube-dl] / youtube_dl / __init__.py
index b29cf6758d0354e6ff34b8823ea1606544a7f5a1..6fb35faadea319857b11fe5c44a0e988830d89c6 100644 (file)
@@ -192,7 +192,7 @@ def parseOpts(overrideArguments=None):
         help='Disable filesystem caching')
     general.add_option(
         '--socket-timeout', dest='socket_timeout',
-        type=float, default=None, help=optparse.SUPPRESS_HELP)
+        type=float, default=None, help=u'Time to wait before giving up, in seconds')
     general.add_option(
         '--bidi-workaround', dest='bidi_workaround', action='store_true',
         help=u'Work around terminals that lack bidirectional text support. Requires bidiv or fribidi executable in PATH')
@@ -522,6 +522,8 @@ def _real_main(argv=None):
             sys.exit(u'ERROR: batch file could not be read')
     all_urls = batchurls + args
     all_urls = [url.strip() for url in all_urls]
+    _enc = preferredencoding()
+    all_urls = [url.decode(_enc, 'ignore') if isinstance(url, bytes) else url]
 
     extractors = gen_extractors()