mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 02:25:11 +00:00
[vidme] Fix view_count extraction and remove comment_count extraction (Fixes #5133)
Comment counts seem to no longer be listed on vid.me
This commit is contained in:
parent
11101076a1
commit
24993e3b39
1 changed files with 1 additions and 5 deletions
|
@ -41,13 +41,10 @@ def _real_extract(self, url):
|
||||||
duration = float_or_none(self._html_search_regex(
|
duration = float_or_none(self._html_search_regex(
|
||||||
r'data-duration="([^"]+)"', webpage, 'duration', fatal=False))
|
r'data-duration="([^"]+)"', webpage, 'duration', fatal=False))
|
||||||
view_count = str_to_int(self._html_search_regex(
|
view_count = str_to_int(self._html_search_regex(
|
||||||
r'<span class="video_views">\s*([\d,\.]+)\s*plays?', webpage, 'view count', fatal=False))
|
r'<(?:li|span) class="video_views">\s*([\d,\.]+)\s*plays?', webpage, 'view count', fatal=False))
|
||||||
like_count = str_to_int(self._html_search_regex(
|
like_count = str_to_int(self._html_search_regex(
|
||||||
r'class="score js-video-vote-score"[^>]+data-score="([\d,\.\s]+)">',
|
r'class="score js-video-vote-score"[^>]+data-score="([\d,\.\s]+)">',
|
||||||
webpage, 'like count', fatal=False))
|
webpage, 'like count', fatal=False))
|
||||||
comment_count = str_to_int(self._html_search_regex(
|
|
||||||
r'class="js-comment-count"[^>]+data-count="([\d,\.\s]+)">',
|
|
||||||
webpage, 'comment count', fatal=False))
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
@ -61,5 +58,4 @@ def _real_extract(self, url):
|
||||||
'duration': duration,
|
'duration': duration,
|
||||||
'view_count': view_count,
|
'view_count': view_count,
|
||||||
'like_count': like_count,
|
'like_count': like_count,
|
||||||
'comment_count': comment_count,
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue