1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-10 19:37:25 +00:00

[mixcloud] Fix view count extraction (Closes #8831, closes #8845)

This commit is contained in:
Sergey M․ 2016-03-13 16:27:58 +06:00
parent fb47597b09
commit 7f4173ae7c

View File

@ -7,6 +7,7 @@ from ..compat import compat_urllib_parse_unquote
from ..utils import (
ExtractorError,
HEADRequest,
parse_count,
str_to_int,
)
@ -85,8 +86,8 @@ class MixcloudIE(InfoExtractor):
uploader_id = self._search_regex(
r'\s+"profile": "([^"]+)",', webpage, 'uploader id', fatal=False)
description = self._og_search_description(webpage)
like_count = str_to_int(self._search_regex(
r'\bbutton-favorite\b[^>]+m-ajax-toggle-count="([^"]+)"',
like_count = parse_count(self._search_regex(
r'\bbutton-favorite[^>]+>.*?<span[^>]+class=["\']toggle-number[^>]+>\s*([^<]+)',
webpage, 'like count', fatal=False))
view_count = str_to_int(self._search_regex(
[r'<meta itemprop="interactionCount" content="UserPlays:([0-9]+)"',