projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[nbc] Recognize https urls (fixes #5300)
[youtube-dl]
/
youtube_dl
/
__init__.py
diff --git
a/youtube_dl/__init__.py
b/youtube_dl/__init__.py
index 49f382695d478acad6892cbec3079d41eba64685..852b2fc3db24b85138b44e7a5cf8f4338d787ce7 100644
(file)
--- a/
youtube_dl/__init__.py
+++ b/
youtube_dl/__init__.py
@@
-9,6
+9,7
@@
import codecs
import io
import os
import random
import io
import os
import random
+import shlex
import sys
import sys
@@
-212,6
+213,11
@@
def _real_main(argv=None):
# PostProcessors
postprocessors = []
# Add the metadata pp first, the other pps will copy it
# PostProcessors
postprocessors = []
# Add the metadata pp first, the other pps will copy it
+ if opts.metafromtitle:
+ postprocessors.append({
+ 'key': 'MetadataFromTitle',
+ 'titleformat': opts.metafromtitle
+ })
if opts.addmetadata:
postprocessors.append({'key': 'FFmpegMetadata'})
if opts.extractaudio:
if opts.addmetadata:
postprocessors.append({'key': 'FFmpegMetadata'})
if opts.extractaudio:
@@
-255,6
+261,9
@@
def _real_main(argv=None):
xattr # Confuse flake8
except ImportError:
parser.error('setting filesize xattr requested but python-xattr is not available')
xattr # Confuse flake8
except ImportError:
parser.error('setting filesize xattr requested but python-xattr is not available')
+ external_downloader_args = None
+ if opts.external_downloader_args:
+ external_downloader_args = shlex.split(opts.external_downloader_args)
match_filter = (
None if opts.match_filter is None
else match_filter_func(opts.match_filter))
match_filter = (
None if opts.match_filter is None
else match_filter_func(opts.match_filter))
@@
-359,6
+368,8
@@
def _real_main(argv=None):
'no_color': opts.no_color,
'ffmpeg_location': opts.ffmpeg_location,
'hls_prefer_native': opts.hls_prefer_native,
'no_color': opts.no_color,
'ffmpeg_location': opts.ffmpeg_location,
'hls_prefer_native': opts.hls_prefer_native,
+ 'external_downloader_args': external_downloader_args,
+ 'cn_verification_proxy': opts.cn_verification_proxy,
}
with YoutubeDL(ydl_opts) as ydl:
}
with YoutubeDL(ydl_opts) as ydl: