mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-29 02:14:51 +00:00
[mtvn] update mtv network related extractors
This commit is contained in:
@@ -2,6 +2,8 @@ from __future__ import unicode_literals
|
||||
|
||||
from .mtv import MTVIE
|
||||
|
||||
# TODO Remove - Reason: Outdated Site
|
||||
|
||||
|
||||
class CMTIE(MTVIE):
|
||||
IE_NAME = 'cmt.com'
|
||||
@@ -39,7 +41,7 @@ class CMTIE(MTVIE):
|
||||
'only_matching': True,
|
||||
}]
|
||||
|
||||
def _extract_mgid(self, webpage):
|
||||
def _extract_mgid(self, webpage, url):
|
||||
mgid = self._search_regex(
|
||||
r'MTVN\.VIDEO\.contentUri\s*=\s*([\'"])(?P<mgid>.+?)\1',
|
||||
webpage, 'mgid', group='mgid', default=None)
|
||||
@@ -50,5 +52,5 @@ class CMTIE(MTVIE):
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
mgid = self._extract_mgid(webpage)
|
||||
mgid = self._extract_mgid(webpage, url)
|
||||
return self.url_result('http://media.mtvnservices.com/embed/%s' % mgid)
|
||||
|
Reference in New Issue
Block a user