#!/usr/bin/env python
# -*- coding: utf-8 -*-
-from __future__ import with_statement
-from __future__ import absolute_import
-
__authors__ = (
'Ricardo Garcia Gonzalez',
'Danny Colligan',
from .update import update_self
from .version import __version__
from .FileDownloader import *
-from .InfoExtractors import gen_extractors
+from .extractor import gen_extractors
from .PostProcessor import *
def parseOpts(overrideArguments=None):
action='store_true', dest='listsubtitles',
help='lists all available subtitles for the video (currently youtube only)', default=False)
video_format.add_option('--sub-format',
- action='store', dest='subtitlesformat', metavar='LANG',
+ action='store', dest='subtitlesformat', metavar='FORMAT',
help='subtitle format [srt/sbv] (default=srt) (currently youtube only)', default='srt')
video_format.add_option('--sub-lang', '--srt-lang',
action='store', dest='subtitleslang', metavar='LANG',
# General configuration
cookie_processor = compat_urllib_request.HTTPCookieProcessor(jar)
- if opts.proxy:
- proxies = {'http': opts.proxy, 'https': opts.proxy}
+ if opts.proxy is not None:
+ if opts.proxy == '':
+ proxies = {}
+ else:
+ proxies = {'http': opts.proxy, 'https': opts.proxy}
else:
proxies = compat_urllib_request.getproxies()
# Set HTTPS proxy to HTTP one if given (https://github.com/rg3/youtube-dl/issues/805)
if opts.usenetrc and (opts.username is not None or opts.password is not None):
parser.error(u'using .netrc conflicts with giving username/password')
if opts.password is not None and opts.username is None:
- parser.error(u'account username missing')
+ print(u'WARNING: account username missing')
if opts.outtmpl is not None and (opts.usetitle or opts.autonumber or opts.useid):
parser.error(u'using output template conflicts with using title, video ID or auto number')
if opts.usetitle and opts.useid: