aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-10-06 06:06:30 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-10-06 06:08:56 +0200
commit8dbe9899a985a04690e467510c94c14f3314843b (patch)
tree137d7cff17d806d180f7763cfa369ceab607759c /youtube_dl/extractor/youtube.py
parentf4aac741d5c98c4350dda478fa4564144d99d13a (diff)
downloadyoutube-dl-8dbe9899a985a04690e467510c94c14f3314843b.tar.xz
Allow users to specify an age limit (fixes #1545)
With these changes, users can now restrict what videos are downloaded by the intented audience, by specifying their age with --age-limit YEARS . Add rudimentary support in youtube, pornotube, and youporn.
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 1101011ea..9bcd035bd 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1495,7 +1495,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
'description': video_description,
'player_url': player_url,
'subtitles': video_subtitles,
- 'duration': video_duration
+ 'duration': video_duration,
+ 'age_restriction': 18 if age_gate else 0,
})
return results