diff options
author | Ismael Mejia <iemejia@gmail.com> | 2013-02-22 03:53:54 +0100 |
---|---|---|
committer | Filippo Valsorda <filippo.valsorda@gmail.com> | 2013-03-20 08:41:54 +0100 |
commit | 9e62bc443996c1950de0841997c76d110cb77c6e (patch) | |
tree | 22ec9c71c62b4c60b8b98eac4a26735a97e7727d /youtube_dl/__init__.py | |
parent | 553d097442ad5ee62d227de2e2703a2377dcf40f (diff) |
Added new option '--sub-format' to choose the format of the subtitles to downloade (defaut=srt)
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 495b5ac41..914d030a3 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -182,6 +182,9 @@ def parseOpts(): video_format.add_option('--all-subs', action='store_true', dest='allsubtitles', help='downloads all the available subtitles of the video (currently youtube only)', default=False) + video_format.add_option('--sub-format', + action='store', dest='subtitlesformat', metavar='LANG', + help='subtitle format [srt/sbv] (default=srt) (currently youtube only)', default='srt') video_format.add_option('--sub-lang', action='store', dest='subtitleslang', metavar='LANG', help='language of the subtitles to download (optional) use IETF language tags like \'en\'') @@ -458,6 +461,7 @@ def _real_main(): 'writesubtitles': opts.writesubtitles, 'onlysubtitles': opts.onlysubtitles, 'allsubtitles': opts.allsubtitles, + 'subtitlesformat': opts.subtitlesformat, 'subtitleslang': opts.subtitleslang, 'matchtitle': decodeOption(opts.matchtitle), 'rejecttitle': decodeOption(opts.rejecttitle), |