aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorJai Grimshaw <jai@jaigrimshaw.com>2013-10-14 16:18:58 +1100
committerJai Grimshaw <jai@jaigrimshaw.com>2013-10-14 16:22:27 +1100
commit1fb07d10a3f5f2baf1ebbdbc69d8ee8615cec2f9 (patch)
treedecadb459ae00dbe508dd884df3deff843c37831 /youtube_dl/__init__.py
parent06723d47c4f934542a626569045e489a09796975 (diff)
[youtube] Adds #1312 Download annotations
Adds #1321 Download annotations from youtube Annotations are downloaded and written to a .annotations.xml file using the https://www.youtube.com/annotations_invideo?features=1&legacy=1&video_id=$VIDEOID API. Added unit test for annotations.
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 3513d719f..fb1270ea2 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -339,6 +339,9 @@ def parseOpts(overrideArguments=None):
filesystem.add_option('--write-info-json',
action='store_true', dest='writeinfojson',
help='write video metadata to a .info.json file', default=False)
+ filesystem.add_option('--write-annotations',
+ action='store_true', dest='writeannotations',
+ help='write video annotations to a .annotation file', default=False)
filesystem.add_option('--write-thumbnail',
action='store_true', dest='writethumbnail',
help='write thumbnail image to disk', default=False)
@@ -601,6 +604,7 @@ def _real_main(argv=None):
'nopart': opts.nopart,
'updatetime': opts.updatetime,
'writedescription': opts.writedescription,
+ 'writeannotations': opts.writeannotations,
'writeinfojson': opts.writeinfojson,
'writethumbnail': opts.writethumbnail,
'writesubtitles': opts.writesubtitles,