Browse Source

[dailymotion] Fix extraction and update _TESTS

Closes #10901

Seems all videos use player V5 syntax now
totalwebcasting
Yen Chi Hsuan 8 years ago
parent
commit
9feb1c9731
No known key found for this signature in database GPG Key ID: 3FDDD575826C5C30
2 changed files with 5 additions and 2 deletions
  1. +1
    -0
      ChangeLog
  2. +4
    -2
      youtube_dl/extractor/dailymotion.py

+ 1
- 0
ChangeLog View File

@ -5,6 +5,7 @@ Core
* [Makefile] Support for GNU make < 4 is fixed; BSD make dropped (#9387) * [Makefile] Support for GNU make < 4 is fixed; BSD make dropped (#9387)
Extractors Extractors
* [dailymotion] Fix extraction (#10901)
* [vimeo:review] Fix extraction (#10900) * [vimeo:review] Fix extraction (#10900)
* [nhl] Correctly handle invalid formats (#10713) * [nhl] Correctly handle invalid formats (#10713)
* [footyroom] Fix extraction (#10810) * [footyroom] Fix extraction (#10810)


+ 4
- 2
youtube_dl/extractor/dailymotion.py View File

@ -94,7 +94,8 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
'title': 'Leanna Decker - Cyber Girl Of The Year Desires Nude [Playboy Plus]', 'title': 'Leanna Decker - Cyber Girl Of The Year Desires Nude [Playboy Plus]',
'uploader': 'HotWaves1012', 'uploader': 'HotWaves1012',
'age_limit': 18, 'age_limit': 18,
}
},
'skip': 'video gone',
}, },
# geo-restricted, player v5 # geo-restricted, player v5
{ {
@ -144,7 +145,8 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
player_v5 = self._search_regex( player_v5 = self._search_regex(
[r'buildPlayer\(({.+?})\);\n', # See https://github.com/rg3/youtube-dl/issues/7826 [r'buildPlayer\(({.+?})\);\n', # See https://github.com/rg3/youtube-dl/issues/7826
r'playerV5\s*=\s*dmp\.create\([^,]+?,\s*({.+?})\);', r'playerV5\s*=\s*dmp\.create\([^,]+?,\s*({.+?})\);',
r'buildPlayer\(({.+?})\);'],
r'buildPlayer\(({.+?})\);',
r'var\s+config\s*=\s*({.+?});'],
webpage, 'player v5', default=None) webpage, 'player v5', default=None)
if player_v5: if player_v5:
player = self._parse_json(player_v5, video_id) player = self._parse_json(player_v5, video_id)


Loading…
Cancel
Save