Compare commits

...

5 Commits

Author SHA1 Message Date
ハルミ
95140159b2
Merge 657006b85d into c5098961b0 2024-08-21 22:33:05 -04:00
ハルミ
657006b85d
Merge branch 'ytdl-org:master' into iwara-playlists 2022-06-07 12:27:27 -07:00
花子
4130d3b650 Remove irrelevant playlist attribute 2021-08-19 20:42:45 -06:00
花子
975fb49d61 flake8 fixes 2021-08-19 20:39:33 -06:00
花子
94cd0f84d0 [iwara] Add Iwara Playlist support 2021-08-19 20:30:56 -06:00
2 changed files with 43 additions and 1 deletions

View File

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

View File

@ -1,6 +1,8 @@
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_urllib_parse_urlparse
from ..utils import (
@ -97,3 +99,40 @@ class IwaraIE(InfoExtractor):
'age_limit': age_limit,
'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,
}