From 45f0deb067bf7c420cdf83a0529fd5274c12de18 Mon Sep 17 00:00:00 2001 From: Chris Larkin Date: Fri, 19 Nov 2021 10:02:12 -0500 Subject: [PATCH] YouTube removed the dislike count from most videos, which was causing errors. Dislike count removed --- AUTHORS | 1 + pafy/backend_youtube_dl.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 196c29cf..71af118c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -9,3 +9,4 @@ hugovk ids1024 williamroot trygveaa +Cupcakus diff --git a/pafy/backend_youtube_dl.py b/pafy/backend_youtube_dl.py index d9a19a41..43009b21 100644 --- a/pafy/backend_youtube_dl.py +++ b/pafy/backend_youtube_dl.py @@ -50,7 +50,8 @@ def _fetch_basic(self): self._length = self._ydl_info['duration'] self._viewcount = self._ydl_info['view_count'] self._likes = self._ydl_info.get('like_count', 0) - self._dislikes = self._ydl_info.get('dislike_count', 0) + # As of November 2021, YT did away with dislike counts + #self._dislikes = self._ydl_info.get('dislike_count', 0) self._username = self._ydl_info['uploader_id'] self._category = self._ydl_info['categories'][0] if self._ydl_info['categories'] else '' self._bestthumb = self._ydl_info['thumbnails'][0]['url']