From a72a02a95cfefce12b8bdaf0011d442ed2da0432 Mon Sep 17 00:00:00 2001 From: DarthSid12 <65533662+DarthSid12@users.noreply.github.com> Date: Sat, 6 Aug 2022 22:34:32 +0530 Subject: [PATCH 1/5] Update backend_internal.py --- pafy/backend_internal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pafy/backend_internal.py b/pafy/backend_internal.py index 9ccdc28f..78369b30 100644 --- a/pafy/backend_internal.py +++ b/pafy/backend_internal.py @@ -129,7 +129,7 @@ def _fetch_gdata(self): self._username = uni(snippet['channelTitle']) statistics = item["statistics"] self._likes = int(statistics["likeCount"]) - self._dislikes = int(statistics["dislikeCount"]) +# self._dislikes = int(statistics["dislikeCount"]) self._have_gdata = 1 From 2f6a68e3c40e5b91815f81ddde8f1f0ff15dc4cd Mon Sep 17 00:00:00 2001 From: DarthSid12 <65533662+DarthSid12@users.noreply.github.com> Date: Sat, 6 Aug 2022 22:35:07 +0530 Subject: [PATCH 2/5] Update backend_internal.py --- pafy/backend_internal.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pafy/backend_internal.py b/pafy/backend_internal.py index 78369b30..4583b755 100644 --- a/pafy/backend_internal.py +++ b/pafy/backend_internal.py @@ -129,7 +129,6 @@ def _fetch_gdata(self): self._username = uni(snippet['channelTitle']) statistics = item["statistics"] self._likes = int(statistics["likeCount"]) -# self._dislikes = int(statistics["dislikeCount"]) self._have_gdata = 1 From c690d4d9b9831321bcf0ea31baac9965940c2b90 Mon Sep 17 00:00:00 2001 From: DarthSid12 <65533662+DarthSid12@users.noreply.github.com> Date: Sat, 6 Aug 2022 22:36:33 +0530 Subject: [PATCH 3/5] Update backend_shared.py --- pafy/backend_shared.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pafy/backend_shared.py b/pafy/backend_shared.py index 68707597..69909c58 100644 --- a/pafy/backend_shared.py +++ b/pafy/backend_shared.py @@ -68,7 +68,6 @@ def __init__(self, video_url, basic=True, gdata=False, self._description = None self._likes = None - self._dislikes = None self._category = None self._published = None self._username = None @@ -317,14 +316,6 @@ def likes(self): return self._likes - @property - def dislikes(self): - """ The number of dislikes for the video. Returns int. """ - if not self._dislikes: - self._fetch_basic() - - return self._dislikes - @property def mix(self): """ The playlist for the related YouTube mix. Returns a Playlist object. """ From bf16346dcfdb7afd4f345b4f64672deef7e8f7e0 Mon Sep 17 00:00:00 2001 From: DarthSid12 <65533662+DarthSid12@users.noreply.github.com> Date: Sat, 6 Aug 2022 22:37:29 +0530 Subject: [PATCH 4/5] Update backend_youtube_dl.py --- pafy/backend_youtube_dl.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pafy/backend_youtube_dl.py b/pafy/backend_youtube_dl.py index d9a19a41..6c29e760 100644 --- a/pafy/backend_youtube_dl.py +++ b/pafy/backend_youtube_dl.py @@ -50,7 +50,6 @@ 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) 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'] From 38a585f72ae900be89634484bc2ff921b74cf117 Mon Sep 17 00:00:00 2001 From: DarthSid12 <65533662+DarthSid12@users.noreply.github.com> Date: Sat, 6 Aug 2022 22:38:09 +0530 Subject: [PATCH 5/5] Update playlist.py --- pafy/playlist.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/pafy/playlist.py b/pafy/playlist.py index 6e164e1b..0533198e 100644 --- a/pafy/playlist.py +++ b/pafy/playlist.py @@ -64,7 +64,6 @@ def get_playlist(playlist_url, basic=False, gdata=False, likes=allinfo.get('likes'), title=allinfo.get('title'), author=allinfo.get('author'), - dislikes=allinfo.get('dislikes'), description=allinfo.get('description'), items=[] ) @@ -84,7 +83,6 @@ def get_playlist(playlist_url, basic=False, gdata=False, user_id=v.get('user_id'), privacy=v.get('privacy'), start=v.get('start', 0.0), - dislikes=v.get('dislikes'), duration=v.get('duration'), comments=v.get('comments'), keywords=v.get('keywords'), @@ -333,7 +331,6 @@ def dict_for_playlist(v): category=get_categoryname(v['snippet']['categoryId']), views=stats.get('viewCount', 0), likes=stats.get('likeCount', 0), - dislikes=stats.get('dislikeCount', 0), comments=stats.get('commentCount', 0), )