diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-12-05 18:29:07 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-12-05 18:29:07 +0100 |
commit | 19e3dfc9f8444a1341a6e71752a3235a0447a565 (patch) | |
tree | 481bdff5ff514467d319f61bd416060309ec6207 /youtube_dl | |
parent | a1ef7e85d6834d5e8a9a2171b220a9e3b93dd2cf (diff) |
[9gag] Like/dislike count (#1895)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/common.py | 3 | ||||
-rw-r--r-- | youtube_dl/extractor/ninegag.py | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 1b049082d..92a0c5050 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -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) diff --git a/youtube_dl/extractor/ninegag.py b/youtube_dl/extractor/ninegag.py index cc00ffbcc..ea986c00e 100644 --- a/youtube_dl/extractor/ninegag.py +++ b/youtube_dl/extractor/ninegag.py @@ -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'], } |