diff options
author | Jesús <heckyel@hyperbola.info> | 2021-12-26 13:29:55 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-12-26 13:29:55 -0500 |
commit | 92067638b10f8debbbfa4ffd4a3cd990a2c2149e (patch) | |
tree | 801bdac14a75040914f61c7770ff0cdd28063b67 /youtube/yt_data_extract | |
parent | 99b70497f25cff562d60744b134b6ab4b10055ad (diff) | |
download | yt-local-92067638b10f8debbbfa4ffd4a3cd990a2c2149e.tar.lz yt-local-92067638b10f8debbbfa4ffd4a3cd990a2c2149e.tar.xz yt-local-92067638b10f8debbbfa4ffd4a3cd990a2c2149e.zip |
Disable dislikes
Ref: https://blog.youtube/news-and-events/update-to-youtube/
Diffstat (limited to 'youtube/yt_data_extract')
-rw-r--r-- | youtube/yt_data_extract/watch_extraction.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/youtube/yt_data_extract/watch_extraction.py b/youtube/yt_data_extract/watch_extraction.py index c73033c..59c5a51 100644 --- a/youtube/yt_data_extract/watch_extraction.py +++ b/youtube/yt_data_extract/watch_extraction.py @@ -135,7 +135,6 @@ def _extract_from_video_information_renderer(renderer_content): def _extract_likes_dislikes(renderer_content): info = { 'like_count': None, - 'dislike_count': None, } for button in renderer_content.get('buttons', ()): button_renderer = button.get('slimMetadataToggleButtonRenderer', {}) @@ -157,8 +156,6 @@ def _extract_likes_dislikes(renderer_content): if 'isLike' in button_renderer: info['like_count'] = count - elif 'isDislike' in button_renderer: - info['dislike_count'] = count return info def _extract_from_owner_renderer(renderer_content): @@ -353,10 +350,8 @@ def _extract_watch_info_desktop(top_level): likes_dislikes = deep_get(video_info, 'sentimentBar', 'sentimentBarRenderer', 'tooltip', default='').split('/') if len(likes_dislikes) == 2: info['like_count'] = extract_int(likes_dislikes[0]) - info['dislike_count'] = extract_int(likes_dislikes[1]) else: info['like_count'] = None - info['dislike_count'] = None info['title'] = extract_str(video_info.get('title', None)) info['author'] = extract_str(deep_get(video_info, 'owner', 'videoOwnerRenderer', 'title')) |