mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-25 07:32:50 +08:00
Updated according to feedback given.
This commit is contained in:
parent
8b4a6d1713
commit
80bc500b04
@ -9,7 +9,7 @@ from ..utils import (
|
|||||||
|
|
||||||
|
|
||||||
class MwaveIE(InfoExtractor):
|
class MwaveIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://mwave\.interest\.me/(([a-z][a-z]\/)?)mnettv/videodetail\.m\?searchVideoDetailVO\.clip_id=(?P<id>[0-9]+)'
|
_VALID_URL = r'https?://mwave\.interest\.me/([^/][^/]/)?mnettv/videodetail\.m\?searchVideoDetailVO\.clip_id=(?P<id>[0-9]+)'
|
||||||
_URL_TEMPLATE = 'http://mwave.interest.me/mnettv/videodetail.m?searchVideoDetailVO.clip_id=%s'
|
_URL_TEMPLATE = 'http://mwave.interest.me/mnettv/videodetail.m?searchVideoDetailVO.clip_id=%s'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'http://mwave.interest.me/mnettv/videodetail.m?searchVideoDetailVO.clip_id=168859',
|
'url': 'http://mwave.interest.me/mnettv/videodetail.m?searchVideoDetailVO.clip_id=168859',
|
||||||
@ -28,13 +28,6 @@ class MwaveIE(InfoExtractor):
|
|||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
# Check that language (if given) is valid
|
|
||||||
languages = ['en/', 'jp/', 'cn/', 'tw/', 'kr/', 'es/']
|
|
||||||
start = url.index('mwave.interest.me/') + len('mwave.interest.me/')
|
|
||||||
end = url.index('mnettv/', start)
|
|
||||||
if url[start:end] and not url[start:end] in languages:
|
|
||||||
raise Exception('[mwave] invalid language detected: {}'.format(url[start:end]))
|
|
||||||
|
|
||||||
vod_info = self._download_json(
|
vod_info = self._download_json(
|
||||||
'http://mwave.interest.me/onair/vod_info.m?vodtype=CL§orid=&endinfo=Y&id=%s' % video_id,
|
'http://mwave.interest.me/onair/vod_info.m?vodtype=CL§orid=&endinfo=Y&id=%s' % video_id,
|
||||||
video_id, 'Download vod JSON')
|
video_id, 'Download vod JSON')
|
||||||
@ -83,14 +76,6 @@ class MwaveMeetGreetIE(InfoExtractor):
|
|||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
# Check that language (if given) is valid
|
|
||||||
languages = ['en/', 'jp/', 'cn/', 'tw/', 'kr/', 'es/']
|
|
||||||
start = url.index('mwave.interest.me/') + len('mwave.interest.me/')
|
|
||||||
end = url.index('meetgreet/', start)
|
|
||||||
if url[start:end] and not url[start:end] in languages:
|
|
||||||
raise Exception('[mwave] invalid language detected: {}'.format(url[start:end]))
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
clip_id = self._html_search_regex(
|
clip_id = self._html_search_regex(
|
||||||
r'<iframe[^>]+src="/mnettv/ifr_clip\.m\?searchVideoDetailVO\.clip_id=(\d+)',
|
r'<iframe[^>]+src="/mnettv/ifr_clip\.m\?searchVideoDetailVO\.clip_id=(\d+)',
|
||||||
|
Loading…
Reference in New Issue
Block a user