]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/jable.py
3 from .common
import InfoExtractor
12 class JableIE(InfoExtractor
):
13 _VALID_URL
= r
'https?://(?:www\.)?jable.tv/videos/(?P<id>[\w-]+)'
15 'url': 'https://jable.tv/videos/pppd-812/',
16 'md5': 'f1537283a9bc073c31ff86ca35d9b2a6',
20 'title': 'PPPD-812 只要表現好巨乳女教師吉根柚莉愛就獎勵學生們在白虎穴內射出精液',
21 'description': 'md5:5b6d4199a854f62c5e56e26ccad19967',
22 'thumbnail': r
're:^https?://.*\.jpg$',
28 'url': 'https://jable.tv/videos/apak-220/',
29 'md5': '71f9239d69ced58ab74a816908847cc1',
33 'title': 'md5:5c3861b7cf80112a6e2b70bccf170824',
35 'thumbnail': r
're:^https?://.*\.jpg$',
39 'upload_date': '20220319',
43 def _real_extract(self
, url
):
44 video_id
= self
._match
_id
(url
)
45 webpage
= self
._download
_webpage
(url
, video_id
)
46 formats
= self
._extract
_m
3u8_formats
(
47 self
._search
_regex
(r
'var\s+hlsUrl\s*=\s*\'([^
\']+)', webpage, 'hls_url
'), video_id, 'mp4
', m3u8_id='hls
')
48 self._sort_formats(formats)
52 'title
': self._og_search_title(webpage),
53 'description
': self._og_search_description(webpage, default=''),
54 'thumbnail
': self._og_search_thumbnail(webpage, default=None),
57 'upload_date
': unified_strdate(self._search_regex(
58 r'class="inactive-color">\D
+\s
+(\d{4}
-\d
+-\d
+)', webpage, 'upload_date
', default=None)),
59 'view_count
': int_or_none(self._search_regex(
60 r'#icon-eye"></use></svg>\n*<span class="mr-3">([\d ]+)',
61 webpage
, 'view_count', default
='').replace(' ', '')),
62 'like_count': int_or_none(self
._search
_regex
(
63 r
'#icon-heart"></use></svg><span class="count">(\d+)', webpage
, 'link_count', default
=None)),
67 class JablePlaylistIE(InfoExtractor
):
68 _VALID_URL
= r
'https?://(?:www\.)?jable.tv/(?:categories|models|tags)/(?P<id>[\w-]+)'
70 'url': 'https://jable.tv/models/kaede-karen/',
77 'url': 'https://jable.tv/categories/roleplay/',
78 'only_matching': True,
80 'url': 'https://jable.tv/tags/girl/',
81 'only_matching': True,
84 def _real_extract(self
, url
):
85 playlist_id
= self
._match
_id
(url
)
86 webpage
= self
._download
_webpage
(url
, playlist_id
)
88 def page_func(page_num
):
90 self
.url_result(player_url
, JableIE
)
91 for player_url
in orderedSet(re
.findall(
92 r
'href="(https://jable.tv/videos/[\w-]+/?)"',
93 self
._download
_webpage
(url
, playlist_id
, query
={
96 'function': 'get_block',
97 'block_id': 'list_videos_common_videos_list',
98 }, note
=f
'Downloading page {page_num + 1}')))]
100 return self
.playlist_result(
101 InAdvancePagedList(page_func
, int_or_none(self
._search
_regex
(
102 r
'from:(\d+)">[^<]+\s*»', webpage
, 'last page number', default
=1)), 24),
103 playlist_id
, self
._search
_regex
(
104 r
'<h2 class="h3-md mb-1">([^<]+)', webpage
, 'playlist title', default
=None))