1
0
mirror of https://github.com/l1ving/youtube-dl synced 2020-11-18 19:53:54 -08:00

Add age-limit option on dailymotion to download explicit

This commit is contained in:
Antoine Guillemin 2018-12-07 10:43:39 +01:00
parent 8c5879715f
commit 9203bf6bea

View File

@ -181,6 +181,11 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
player, lambda x: x['context']['metadata_template_url1']))
if metadata_url:
metadata_url = metadata_url.replace(':videoId', video_id)
else:
if (17 < age_limit) :
metadata_url = update_url_query(
'https://www.dailymotion.com/player/metadata/video/%s'
% video_id, {})
else :
metadata_url = update_url_query(
'https://www.dailymotion.com/player/metadata/video/%s'