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

[dailymotion] metadata must be dict

This commit is contained in:
Enes 2018-10-02 21:29:07 +03:00
parent 927416d06e
commit 7fc0dd05e7

View File

@ -174,11 +174,11 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
if player_v5:
player = self._parse_json(player_v5, video_id)
metadata = try_get(
player, lambda x: x['metadata']) or self._download_json(
'http://www.dailymotion.com/player/metadata/video/%s' % video_id, video_id, query={
'integration': 'inline',
'GK_PV5_NEON': '1',
})
player, lambda x: x['metadata'], dict) or self._download_json(
'http://www.dailymotion.com/player/metadata/video/%s' % video_id, video_id, query={
'integration': 'inline',
'GK_PV5_NEON': '1',
})
if metadata.get('error', {}).get('type') == 'password_protected':
password = self._downloader.params.get('videopassword')