[dailymotion] fix extraction
This commit is contained in:
parent
cbc4c5757d
commit
927416d06e
@ -24,6 +24,7 @@ from ..utils import (
|
||||
str_to_int,
|
||||
unescapeHTML,
|
||||
urlencode_postdata,
|
||||
try_get,
|
||||
)
|
||||
|
||||
|
||||
@ -171,7 +172,13 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
|
||||
r'__PLAYER_CONFIG__\s*=\s*({.+?});'],
|
||||
webpage, 'player v5', default=None)
|
||||
if player_v5:
|
||||
metadata = self._download_json('http://www.dailymotion.com/player/metadata/video/%s?integration=inline&GK_PV5_NEON=1' % video_id, video_id)
|
||||
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',
|
||||
})
|
||||
|
||||
if metadata.get('error', {}).get('type') == 'password_protected':
|
||||
password = self._downloader.params.get('videopassword')
|
||||
|
Loading…
x
Reference in New Issue
Block a user