One of the most important things a person does on a daily basis is follow news. What is this concept of news and the nature of it? We all know that the above question is pretty self explanatory. So, what if the “news” that one gets to know is a modified version of truth? A lot of us do follow one or a couple of specific news channels and subscribe to a specific news paper. And in the process, we often miss out on how that information is being processed and released as news by the other media entities on the same topic. So the purpose of this is to bring into light, the differences and the extent upto which each media organisation is influencing/filtering what is reaching the reader, based on their own reasons and convenience so that, people are less likely to be deceived.
Creation of a Twitter Bot which analyses and compares the similar kind of news and plots the polarity and subjectivity of the news channel on trending topic. A sample plot is shown at the end of the file. So the next update or task would be adding new news channels and comparing their similar news.
- Web Scraping the data from other news channels
- Comparison model to compare the similar kind of headings from different news channels
- Working with Twitter Bot
- Hosting it
- Gets the trending data from the Reuters and analysing it using NLP and plotting a box graph of both polarity and subjectivity
- Posts it on twitter
- Everyday update at 10:00 pm
- Hosted on Heruko
Here's an image of bot in action:
-
Twitter Account
-
Modules required
- tweepy
- time
- re
- datetime
- bs4
- textblob
- matplotlib
pip install requirements.txt
- Go to the following link.
- Click the create app button
- Fill the necessary details like :
- Name of the bot.
- Website name.
- Description.
- Goto Keys and tokens and generate your access tokens.
Authorise the app with tweepy api with consumer keys and access tokens. Now replace the credentials in the code with your credentials and search hashtags with the one which you wanted and enjoy the app up and running.
Use the following commands to host this app in heroku
heroku create
git add .
git commit -m "initial commit"
git push heroku master
heroku ps:scale worker=1
heroku logs --tail