This Python script fetches the dislike count for a given YouTube video ID using the Return YouTube Dislike API
Please note that this relies on a third-party API and the accuracy of the dislike count may vary.
- Python 3.6+
requests
library
- Install the
requests
library:pip install requests
- Replace
"your video id here"
in thevideo_id
variable with the actual YouTube video ID. - Run the script:
python get_dislikes.py
import requests
def get_dislikes(video_id):
# ... (code remains the same)
if __name__ == "__main__":
video_id = "dQw4w9WgXcQ" # Replace with the actual video ID
dislikes = get_dislikes(video_id)
print(f"Dislikes: {dislikes}")