[mtvn] update mtv network related extractors
This commit is contained in:
parent
b6e0c7d2e3
commit
cf7cb94287
7 changed files with 36 additions and 17 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue