summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/hentaistigma.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:37:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:37:42 +0000
commitc7bab7c39fd51c0812f70020172766303191bc01 (patch)
tree56c05fbdd4fc47409d48ba318a4b621a7b0d299a /yt_dlp/extractor/hentaistigma.py
parentInitial commit. (diff)
downloadyt-dlp-c7bab7c39fd51c0812f70020172766303191bc01.tar.xz
yt-dlp-c7bab7c39fd51c0812f70020172766303191bc01.zip
Adding upstream version 2023.03.04.upstream/2023.03.04upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/hentaistigma.py')
-rw-r--r--yt_dlp/extractor/hentaistigma.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/yt_dlp/extractor/hentaistigma.py b/yt_dlp/extractor/hentaistigma.py
new file mode 100644
index 0000000..ca5ffc2
--- /dev/null
+++ b/yt_dlp/extractor/hentaistigma.py
@@ -0,0 +1,37 @@
+from .common import InfoExtractor
+
+
+class HentaiStigmaIE(InfoExtractor):
+ _VALID_URL = r'^https?://hentai\.animestigma\.com/(?P<id>[^/]+)'
+ _TEST = {
+ '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):
+ video_id = self._match_id(url)
+
+ webpage = self._download_webpage(url, video_id)
+
+ title = self._html_search_regex(
+ r'<h2[^>]+class="posttitle"[^>]*><a[^>]*>([^<]+)</a>',
+ webpage, 'title')
+ wrap_url = self._html_search_regex(
+ r'<iframe[^>]+src="([^"]+mp4)"', webpage, 'wrapper url')
+ wrap_webpage = self._download_webpage(wrap_url, video_id)
+
+ video_url = self._html_search_regex(
+ r'file\s*:\s*"([^"]+)"', wrap_webpage, 'video url')
+
+ return {
+ 'id': video_id,
+ 'url': video_url,
+ 'title': title,
+ 'age_limit': 18,
+ }