mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-14 15:22:35 +00:00
[mtv] Fix some videos (#1453)
Partial fix for #713 Authored by: Sipherdrakon
This commit is contained in:
parent
fa0b816e37
commit
6b301aaa34
1 changed files with 8 additions and 4 deletions
|
@ -305,6 +305,14 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
||||||
if not mgid:
|
if not mgid:
|
||||||
mgid = self._extract_triforce_mgid(webpage)
|
mgid = self._extract_triforce_mgid(webpage)
|
||||||
|
|
||||||
|
if not mgid:
|
||||||
|
mgid = self._search_regex(
|
||||||
|
r'"videoConfig":{"videoId":"(mgid:.*?)"', webpage, 'mgid', default=None)
|
||||||
|
|
||||||
|
if not mgid:
|
||||||
|
mgid = self._search_regex(
|
||||||
|
r'"media":{"video":{"config":{"uri":"(mgid:.*?)"', webpage, 'mgid', default=None)
|
||||||
|
|
||||||
if not mgid:
|
if not mgid:
|
||||||
data = self._parse_json(self._search_regex(
|
data = self._parse_json(self._search_regex(
|
||||||
r'__DATA__\s*=\s*({.+?});', webpage, 'data'), None)
|
r'__DATA__\s*=\s*({.+?});', webpage, 'data'), None)
|
||||||
|
@ -313,10 +321,6 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
||||||
video_player = self._extract_child_with_type(ab_testing or main_container, 'VideoPlayer')
|
video_player = self._extract_child_with_type(ab_testing or main_container, 'VideoPlayer')
|
||||||
mgid = video_player['props']['media']['video']['config']['uri']
|
mgid = video_player['props']['media']['video']['config']['uri']
|
||||||
|
|
||||||
if not mgid:
|
|
||||||
mgid = self._search_regex(
|
|
||||||
r'"media":{"video":{"config":{"uri":"(mgid:.*?)"', webpage, 'mgid', default=None)
|
|
||||||
|
|
||||||
return mgid
|
return mgid
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
|
Loading…
Reference in a new issue