]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[mixcloud] View count and like count may be absent
authorYen Chi Hsuan <yan12125@gmail.com>
Fri, 24 Jun 2016 09:26:12 +0000 (17:26 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Fri, 24 Jun 2016 09:26:12 +0000 (17:26 +0800)
Closes #9874

youtube_dl/extractor/mixcloud.py

index 483f6925fda989fc5111694c8c82f1807a1f3d97..560fe188b675a619785332eea285484fa85154bf 100644 (file)
@@ -102,11 +102,11 @@ class MixcloudIE(InfoExtractor):
         description = self._og_search_description(webpage)
         like_count = parse_count(self._search_regex(
             r'\bbutton-favorite[^>]+>.*?<span[^>]+class=["\']toggle-number[^>]+>\s*([^<]+)',
-            webpage, 'like count', fatal=False))
+            webpage, 'like count', default=None))
         view_count = str_to_int(self._search_regex(
             [r'<meta itemprop="interactionCount" content="UserPlays:([0-9]+)"',
              r'/listeners/?">([0-9,.]+)</a>'],
-            webpage, 'play count', fatal=False))
+            webpage, 'play count', default=None))
 
         return {
             'id': track_id,