diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-03-13 16:27:58 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-03-13 16:27:58 +0600 |
commit | 7f4173ae7c0dae870250018cd4915df36ccf0f54 (patch) | |
tree | 34ccb00a6192bfc56b384f2bf4d6603c488f25d9 | |
parent | fb47597b09cf8474931a4509bebc510403b30e25 (diff) |
[mixcloud] Fix view count extraction (Closes #8831, closes #8845)
-rw-r--r-- | youtube_dl/extractor/mixcloud.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/mixcloud.py b/youtube_dl/extractor/mixcloud.py index c2b7ed9ab..101497118 100644 --- a/youtube_dl/extractor/mixcloud.py +++ b/youtube_dl/extractor/mixcloud.py @@ -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]+)"', |