Skip to content

Commit

Permalink
[HentaiStigma] Support new frame format with HTML5 video
Browse files Browse the repository at this point in the history
* resolves ytdl-org#25019
  • Loading branch information
dirkf committed Oct 7, 2024
1 parent 84eb8b8 commit 9c247fc
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions youtube_dl/extractor/hentaistigma.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# coding: utf-8
from __future__ import unicode_literals

from .common import InfoExtractor
from ..utils import (
merge_dicts,
traverse_obj,
)


class HentaiStigmaIE(InfoExtractor):
Expand All @@ -24,16 +29,17 @@ def _real_extract(self, url):
title = self._html_search_regex(
r'<h2[^>]+class="posttitle"[^>]*><a[^>]*>([^<]+)</a>',
webpage, 'title')
wrap_url = self._html_search_regex(

wrap_url = self._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')
vid_page = self._download_webpage(wrap_url, video_id)

entries = self._parse_html5_media_entries(wrap_url, vid_page, video_id)
self._sort_formats(traverse_obj(entries, (0, 'formats')) or [])

return {
return merge_dicts({
'id': video_id,
'url': video_url,
'title': title,
'age_limit': 18,
}
}, entries[0])

0 comments on commit 9c247fc

Please sign in to comment.