]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[vidme] Fix view_count extraction and remove comment_count extraction (Fixes #5133)
authorNaglis Jonaitis <njonaitis@gmail.com>
Sun, 8 Mar 2015 12:08:45 +0000 (14:08 +0200)
committerNaglis Jonaitis <njonaitis@gmail.com>
Sun, 8 Mar 2015 12:12:10 +0000 (14:12 +0200)
Comment counts seem to no longer be listed on vid.me

youtube_dl/extractor/vidme.py

index 339c3d897b4e967a4000c33da1a9c027f4d12633..bd953fb4cc212f50dce2cac624c9391a14e82898 100644 (file)
@@ -41,13 +41,10 @@ class VidmeIE(InfoExtractor):
         duration = float_or_none(self._html_search_regex(
             r'data-duration="([^"]+)"', webpage, 'duration', fatal=False))
         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(
             r'class="score js-video-vote-score"[^>]+data-score="([\d,\.\s]+)">',
             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 {
             'id': video_id,
@@ -61,5 +58,4 @@ class VidmeIE(InfoExtractor):
             'duration': duration,
             'view_count': view_count,
             'like_count': like_count,
-            'comment_count': comment_count,
         }