diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-06-29 22:21:09 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-06-29 22:21:09 +0600 |
commit | cf386750c9194839e419a0412f45f25f28236c77 (patch) | |
tree | f286301b8db79c479c2539797d300ab1a5d8e74a | |
parent | 54f428f645b7f9db235a156f829896ea2da8495a (diff) |
[hentaistigma] Modernize
-rw-r--r-- | youtube_dl/extractor/hentaistigma.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/youtube_dl/extractor/hentaistigma.py b/youtube_dl/extractor/hentaistigma.py index 225af8cb3..f5aa73d18 100644 --- a/youtube_dl/extractor/hentaistigma.py +++ b/youtube_dl/extractor/hentaistigma.py @@ -1,7 +1,5 @@ from __future__ import unicode_literals -import re - from .common import InfoExtractor @@ -19,20 +17,19 @@ class HentaiStigmaIE(InfoExtractor): } def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - video_id = mobj.group('id') + video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) title = self._html_search_regex( - r'<h2 class="posttitle"><a[^>]*>([^<]+)</a>', + r'<h2[^>]+class="posttitle"[^>]*><a[^>]*>([^<]+)</a>', webpage, 'title') wrap_url = self._html_search_regex( - r'<iframe src="([^"]+mp4)"', webpage, 'wrapper url') + r'<iframe[^>]+src="([^"]+mp4)"', webpage, 'wrapper url') wrap_webpage = self._download_webpage(wrap_url, video_id) video_url = self._html_search_regex( - r'file:"([^"]+)"', wrap_webpage, 'video url') + r'file\s*:\s*"([^"]+)"', wrap_webpage, 'video url') return { 'id': video_id, |