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:
parent
927416d06e
commit
7fc0dd05e7
@ -174,11 +174,11 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
|
|||||||
if player_v5:
|
if player_v5:
|
||||||
player = self._parse_json(player_v5, video_id)
|
player = self._parse_json(player_v5, video_id)
|
||||||
metadata = try_get(
|
metadata = try_get(
|
||||||
player, lambda x: x['metadata']) or self._download_json(
|
player, lambda x: x['metadata'], dict) or self._download_json(
|
||||||
'http://www.dailymotion.com/player/metadata/video/%s' % video_id, video_id, query={
|
'http://www.dailymotion.com/player/metadata/video/%s' % video_id, video_id, query={
|
||||||
'integration': 'inline',
|
'integration': 'inline',
|
||||||
'GK_PV5_NEON': '1',
|
'GK_PV5_NEON': '1',
|
||||||
})
|
})
|
||||||
|
|
||||||
if metadata.get('error', {}).get('type') == 'password_protected':
|
if metadata.get('error', {}).get('type') == 'password_protected':
|
||||||
password = self._downloader.params.get('videopassword')
|
password = self._downloader.params.get('videopassword')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user