This content originally appeared on DEV Community and was authored by JavideJ
Overview of My Submission
YT_dislikes is a twitter bot that allows you to know the number of dislikes (and likes) of a YouTube video. Now it is not possible to see the number of dislikes in YouTube. To discover it, tweet tagging @YT_dislikes and adding the url of the YouTube video and the bot will answer you with the stats.
UPDATE! Now we can´t get the number of dislikes
from the API (I´m sad), so this update includes the Return Youtube Dislike Chrome extension (thanks) to unlock them on the YouTube website.
This is how the bot works:
- Get the last 20 tweets tagging the bot
- Compare their tweet ID to the ones stored in the Mongo database (which are the tweets already answered)
- If those IDs are already in the database, do nothing
- If one or some are not in the database, open the YT url provided in the tweet using Selenium and get a screenshot of the likes/dislikes and generate a reply to the tweet
- Add these tweets ID to the database
And these are the main tools used with Python:
- pyMongo
- Tweepy
- YouTube Data API
- Selenium
Submission Category
Choose Your Own Adventure
Link to Code
https://github.com/JavideJ/YT_dislikes_bot
Automatic reply
This content originally appeared on DEV Community and was authored by JavideJ
JavideJ | Sciencx (2022-01-12T23:39:22+00:00) YT Dislikes Twitter Bot. Retrieved from https://www.scien.cx/2022/01/12/yt-dislikes-twitter-bot/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.