mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-18 10:28:29 +00:00
[ie/rule34video] Fix extracting like count
This commit is contained in:
parent
f44a01bf67
commit
2f9e5789b7
@ -93,6 +93,10 @@ def _real_extract(self, url):
|
||||
uploader = clean_html(uploader_link)
|
||||
uploader_url = extract_attributes(uploader_link or '').get('href')
|
||||
|
||||
like_count = None
|
||||
if like_count_text := re.search(r'\(([\d,]+)\)', get_element_by_class('voters count', webpage)):
|
||||
like_count = parse_count(like_count_text.group(1))
|
||||
|
||||
json_ld = traverse_obj(self._search_json_ld(webpage, video_id, default={}), ({
|
||||
'title': 'title',
|
||||
'view_count': 'view_count',
|
||||
@ -113,7 +117,7 @@ def _real_extract(self, url):
|
||||
r'"icon-clock"></i>\s+<span>((?:\d+:?)+)', webpage, 'duration', default=None)),
|
||||
'view_count': int_or_none(self._html_search_regex(
|
||||
r'"icon-eye"></i>\s+<span>([ \d]+)', webpage, 'views', default='').replace(' ', '')),
|
||||
'like_count': parse_count(get_element_by_class('voters count', webpage)),
|
||||
'like_count': like_count,
|
||||
'comment_count': int_or_none(self._search_regex(
|
||||
r'[^(]+\((\d+)\)', get_element_by_attribute('href', '#tab_comments', webpage), 'comment count', fatal=False)),
|
||||
'age_limit': 18,
|
||||
|
Loading…
Reference in New Issue
Block a user