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

@ -182,13 +182,18 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
if metadata_url: if metadata_url:
metadata_url = metadata_url.replace(':videoId', video_id) metadata_url = metadata_url.replace(':videoId', video_id)
else: else:
metadata_url = update_url_query( if (17 < age_limit) :
'https://www.dailymotion.com/player/metadata/video/%s' metadata_url = update_url_query(
% video_id, { 'https://www.dailymotion.com/player/metadata/video/%s'
'embedder': url, % video_id, {})
'integration': 'inline', else :
'GK_PV5_NEON': '1', metadata_url = update_url_query(
}) 'https://www.dailymotion.com/player/metadata/video/%s'
% video_id, {
'embedder': url,
'integration': 'inline',
'GK_PV5_NEON': '1',
})
metadata = self._download_json( metadata = self._download_json(
metadata_url, video_id, 'Downloading metadata JSON') metadata_url, video_id, 'Downloading metadata JSON')