'I have a problem with dislike error when creating an pafy.new url, perhaps it's because youtube hid numer of dislikes

import pafy
import vlc
url = "https://www.youtube.com/watch?v=h_D3VFfhvs4"
video = pafy.new(url)

KeyError: 'dislike_count'



Solution 1:[1]

There's a less heinous solution than editing package files by using an older version of youtube-dl.

Just run pip install youtube-dl==2020.12.2

Solution 2:[2]

just comment the line 53 and 54 from backend_youtube_dl.py in your pafy packages path

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 snarik
Solution 2