[dailymotion] Make comment count optional (closes #12209)
authorSergey M․ <dstftw@gmail.com>
Wed, 22 Feb 2017 14:49:30 +0000 (21:49 +0700)
committerSergey M․ <dstftw@gmail.com>
Wed, 22 Feb 2017 14:49:30 +0000 (21:49 +0700)
Not served anymore

youtube_dl/extractor/dailymotion.py

index 31bf5faf6605553cdcd79f670285a554e711364f..b312401dc69b9a9ca35cebca767b11f10174e1c2 100644 (file)
@@ -66,7 +66,6 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
                 'uploader_id': 'xijv66',
                 'age_limit': 0,
                 'view_count': int,
-                'comment_count': int,
             }
         },
         # Vevo video
@@ -140,7 +139,7 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
         view_count = str_to_int(view_count_str)
         comment_count = int_or_none(self._search_regex(
             r'<meta[^>]+itemprop="interactionCount"[^>]+content="UserComments:(\d+)"',
-            webpage, 'comment count', fatal=False))
+            webpage, 'comment count', default=None))
 
         player_v5 = self._search_regex(
             [r'buildPlayer\(({.+?})\);\n',  # See https://github.com/rg3/youtube-dl/issues/7826