[9gag] Like/dislike count (#1895)
authorPhilipp Hagemeister <phihag@phihag.de>
Thu, 5 Dec 2013 17:29:07 +0000 (18:29 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Thu, 5 Dec 2013 17:29:07 +0000 (18:29 +0100)
youtube_dl/extractor/common.py
youtube_dl/extractor/ninegag.py

index 1b049082de5bbc9541a6513acc4124a478b87ea0..92a0c50508af273a2f895b6061968cfae5284454 100644 (file)
@@ -55,6 +55,9 @@ class InfoExtractor(object):
     subtitles:      The subtitle file contents as a dictionary in the format
                     {language: subtitles}.
     view_count:     How many users have watched the video on the platform.
+    like_count:     Number of positive ratings of the video
+    dislike_count:  Number of negative ratings of the video
+    comment_count:  Number of comments on the video
     urlhandle:      [internal] The urlHandle to be used to download the file,
                     like returned by urllib.request.urlopen
     age_limit:      Age restriction for the video, as an integer (years)
index cc00ffbcc97233fdce8f01655f4263a405ca32bd..ea986c00e7b1170e883978b82cfde8f0e22d8dd0 100644 (file)
@@ -37,5 +37,7 @@ class NineGagIE(InfoExtractor):
             'title': data['title'],
             'description': data['description'],
             'view_count': int(data['view_count']),
+            'like_count': int(data['statistic']['like']),
+            'dislike_count': int(data['statistic']['dislike']),
             'thumbnail': data['thumbnail_url'],
         }