This commit is contained in:
ハルミ 2024-08-21 22:33:05 -04:00 committed by GitHub
commit 95140159b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 43 additions and 1 deletions

View File

@ -547,7 +547,10 @@ from .ivi import (
IviCompilationIE IviCompilationIE
) )
from .ivideon import IvideonIE from .ivideon import IvideonIE
from .iwara import IwaraIE from .iwara import (
IwaraIE,
IwaraPlaylistIE,
)
from .izlesene import IzleseneIE from .izlesene import IzleseneIE
from .jamendo import ( from .jamendo import (
JamendoIE, JamendoIE,

View File

@ -1,6 +1,8 @@
# coding: utf-8 # coding: utf-8
from __future__ import unicode_literals from __future__ import unicode_literals
import re
from .common import InfoExtractor from .common import InfoExtractor
from ..compat import compat_urllib_parse_urlparse from ..compat import compat_urllib_parse_urlparse
from ..utils import ( from ..utils import (
@ -97,3 +99,40 @@ class IwaraIE(InfoExtractor):
'age_limit': age_limit, 'age_limit': age_limit,
'formats': formats, 'formats': formats,
} }
class IwaraPlaylistIE(InfoExtractor):
IE_NAME = 'iwara:playlist'
_VALID_URL = r'https?://(?:www\.|ecchi\.)?iwara\.tv/playlist/(?P<id>[a-zA-Z0-9-]+)'
_TEST = {
'url': 'https://ecchi.iwara.tv/playlist/best-enf',
'info_dict': {
'title': 'Best enf',
'uploader_id': 'Jared98112',
'id': 'best-enf',
},
'playlist_mincount': 50,
}
def _real_extract(self, url):
playlist_id = self._match_id(url)
webpage = self._download_webpage(url, playlist_id)
title = self._html_search_regex(r'<h1 class="title"[^>]*?>(.*?)</h1>', webpage, 'title')
uploader_id = self._html_search_regex(
r'<div class="[^"]views-field-name">\s*<span class="field-content"><h2>(.*?)</h2>',
webpage,
'uploader_id')
urls = re.findall(
r'<h3 class="title">\s*<a href="([^"]+)">',
webpage)
entries = [self.url_result(u) for u in urls]
return {
'_type': 'playlist',
'id': playlist_id,
'uploader_id': uploader_id,
'title': title,
'entries': entries,
}