Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 12, 2022 11:39 pm GMT

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 cant get the number of dislikes from the API (Im 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

Tweet
Tweet

Automatic reply

Automatic reply

Automatic reply


Original Link: https://dev.to/javidej/dislikes-twitter-bot-52b2

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To