|
|
@ -120,7 +120,7 @@ class CrunchyrollBaseIE(InfoExtractor):
|
|
|
|
|
|
|
|
|
|
|
|
class CrunchyrollIE(CrunchyrollBaseIE, VRVIE):
|
|
|
|
class CrunchyrollIE(CrunchyrollBaseIE, VRVIE):
|
|
|
|
IE_NAME = 'crunchyroll'
|
|
|
|
IE_NAME = 'crunchyroll'
|
|
|
|
_VALID_URL = r'https?://(?:(?P<prefix>www|m)\.)?(?P<url>crunchyroll\.(?:com|fr)/(?:media(?:-|/\?id=)|(?:[^/]*/){1,2}[^/?&]*?)(?P<video_id>[0-9]+))(?:[/?&]|$)'
|
|
|
|
_VALID_URL = r'https?://(?:(?P<prefix>www|m)\.)?(?P<url>crunchyroll\.(?:com|fr)/(?:media(?:-|/\?id=)|(?:[^/]*/){1,2}[^/?&]*?)(?P<id>[0-9]+))(?:[/?&]|$)'
|
|
|
|
_TESTS = [{
|
|
|
|
_TESTS = [{
|
|
|
|
'url': 'http://www.crunchyroll.com/wanna-be-the-strongest-in-the-world/episode-1-an-idol-wrestler-is-born-645513',
|
|
|
|
'url': 'http://www.crunchyroll.com/wanna-be-the-strongest-in-the-world/episode-1-an-idol-wrestler-is-born-645513',
|
|
|
|
'info_dict': {
|
|
|
|
'info_dict': {
|
|
|
@ -413,7 +413,7 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
|
|
|
|
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
def _real_extract(self, url):
|
|
|
|
mobj = re.match(self._VALID_URL, url)
|
|
|
|
mobj = re.match(self._VALID_URL, url)
|
|
|
|
video_id = mobj.group('video_id')
|
|
|
|
video_id = mobj.group('id')
|
|
|
|
|
|
|
|
|
|
|
|
if mobj.group('prefix') == 'm':
|
|
|
|
if mobj.group('prefix') == 'm':
|
|
|
|
mobile_webpage = self._download_webpage(url, video_id, 'Downloading mobile webpage')
|
|
|
|
mobile_webpage = self._download_webpage(url, video_id, 'Downloading mobile webpage')
|
|
|
|