mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-22 15:57:23 +00:00
[hentaistigma] Modernize
This commit is contained in:
parent
54f428f645
commit
cf386750c9
1 changed files with 4 additions and 7 deletions
|
@ -1,7 +1,5 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import re
|
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,20 +17,19 @@ class HentaiStigmaIE(InfoExtractor):
|
||||||
}
|
}
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
mobj = re.match(self._VALID_URL, url)
|
video_id = self._match_id(url)
|
||||||
video_id = mobj.group('id')
|
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
r'<h2 class="posttitle"><a[^>]*>([^<]+)</a>',
|
r'<h2[^>]+class="posttitle"[^>]*><a[^>]*>([^<]+)</a>',
|
||||||
webpage, 'title')
|
webpage, 'title')
|
||||||
wrap_url = self._html_search_regex(
|
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)
|
wrap_webpage = self._download_webpage(wrap_url, video_id)
|
||||||
|
|
||||||
video_url = self._html_search_regex(
|
video_url = self._html_search_regex(
|
||||||
r'file:"([^"]+)"', wrap_webpage, 'video url')
|
r'file\s*:\s*"([^"]+)"', wrap_webpage, 'video url')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
|
Loading…
Reference in a new issue