|
|
@ -62,6 +62,7 @@ from .utils import (
|
|
|
|
MaxDownloadsReached,
|
|
|
|
MaxDownloadsReached,
|
|
|
|
preferredencoding,
|
|
|
|
preferredencoding,
|
|
|
|
SameFileError,
|
|
|
|
SameFileError,
|
|
|
|
|
|
|
|
setproctitle,
|
|
|
|
std_headers,
|
|
|
|
std_headers,
|
|
|
|
write_string,
|
|
|
|
write_string,
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -471,12 +472,15 @@ def parseOpts(overrideArguments=None):
|
|
|
|
|
|
|
|
|
|
|
|
return parser, opts, args
|
|
|
|
return parser, opts, args
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _real_main(argv=None):
|
|
|
|
def _real_main(argv=None):
|
|
|
|
# Compatibility fixes for Windows
|
|
|
|
# Compatibility fixes for Windows
|
|
|
|
if sys.platform == 'win32':
|
|
|
|
if sys.platform == 'win32':
|
|
|
|
# https://github.com/rg3/youtube-dl/issues/820
|
|
|
|
# https://github.com/rg3/youtube-dl/issues/820
|
|
|
|
codecs.register(lambda name: codecs.lookup('utf-8') if name == 'cp65001' else None)
|
|
|
|
codecs.register(lambda name: codecs.lookup('utf-8') if name == 'cp65001' else None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setproctitle(u'youtube-dl')
|
|
|
|
|
|
|
|
|
|
|
|
parser, opts, args = parseOpts(argv)
|
|
|
|
parser, opts, args = parseOpts(argv)
|
|
|
|
|
|
|
|
|
|
|
|
# Set user agent
|
|
|
|
# Set user agent
|
|
|
|