DEV Community

Cover image for YT Dislikes Twitter Bot
JavideJ
JavideJ

Posted on

YT Dislikes Twitter Bot

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 number of dislikes is a prediction they do thanks to their great database.

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, use Selenium to 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:

  • pyMongo
  • Tweepy
  • YouTube Data API
  • Selenium

Submission Category

Choose Your Own Adventure

Link to Code

https://github.com/JavideJ/YT_dislikes_bot

Tweet

Tweet

Automatic reply

Automatic reply

Automatic reply

Top comments (2)

Collapse
 
adreanceja profile image
Adrian Ceja

Interesting I will clone your repository to check on my computer. Thanks for the post

Collapse
 
javidej profile image
JavideJ

Thank you!