mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-16 23:35:45 +00:00
parent
a803582717
commit
76f2b63a26
1 changed files with 11 additions and 1 deletions
|
@ -290,7 +290,17 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
|||
main_container = self._extract_child_with_type(data, 'MainContainer')
|
||||
ab_testing = self._extract_child_with_type(main_container, 'ABTesting')
|
||||
video_player = self._extract_child_with_type(ab_testing or main_container, 'VideoPlayer')
|
||||
mgid = video_player['props']['media']['video']['config']['uri']
|
||||
if video_player:
|
||||
mgid = video_player['props']['media']['video']['config']['uri']
|
||||
else:
|
||||
flex_wrapper = self._extract_child_with_type(ab_testing or main_container, 'FlexWrapper')
|
||||
auth_suite_wrapper = self._extract_child_with_type(flex_wrapper, 'AuthSuiteWrapper')
|
||||
player = self._extract_child_with_type(auth_suite_wrapper or flex_wrapper, 'Player')
|
||||
if player:
|
||||
mgid = player['props']['videoDetail']['mgid']
|
||||
|
||||
if not mgid:
|
||||
raise ExtractorError('Could not extract mgid')
|
||||
|
||||
return mgid
|
||||
|
||||
|
|
Loading…
Reference in a new issue