X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fhentaistigma.py;h=86a93de4d62cd906d5efb03faa9e568792d82392;hb=HEAD;hp=4f2d30599df71c98585cf45e4c8f096f74276724;hpb=24e6ec8ac862267b100539fbe745ec87015bbc3d;p=youtube-dl diff --git a/youtube_dl/extractor/hentaistigma.py b/youtube_dl/extractor/hentaistigma.py index 4f2d30599..86a93de4d 100644 --- a/youtube_dl/extractor/hentaistigma.py +++ b/youtube_dl/extractor/hentaistigma.py @@ -1,43 +1,39 @@ -import re +from __future__ import unicode_literals from .common import InfoExtractor + class HentaiStigmaIE(InfoExtractor): - _VALID_URL = r'^https?://hentai\.animestigma\.com/(?P[^/]+)' + _VALID_URL = r'^https?://hentai\.animestigma\.com/(?P[^/]+)' _TEST = { - u'url': u'http://hentai.animestigma.com/inyouchuu-etsu-bonus/', - u'file': u'inyouchuu-etsu-bonus.mp4', - u'md5': u'4e3d07422a68a4cc363d8f57c8bf0d23', - u'info_dict': { - u"title": u"Inyouchuu Etsu Bonus", - u"age_limit": 18, + 'url': 'http://hentai.animestigma.com/inyouchuu-etsu-bonus/', + 'md5': '4e3d07422a68a4cc363d8f57c8bf0d23', + 'info_dict': { + 'id': 'inyouchuu-etsu-bonus', + 'ext': 'mp4', + 'title': 'Inyouchuu Etsu Bonus', + 'age_limit': 18, } } def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - - video_id = mobj.group('videoid') + video_id = self._match_id(url) - # Get webpage content webpage = self._download_webpage(url, video_id) - # Get the video title - video_title = self._html_search_regex(r'

]*>([^<]+)', - webpage, u'title').strip() - - # Get the wrapper url - wrap_url = self._html_search_regex(r'