Wanews
A Natural Language Processing Powered bot that curates news stories from various news sources, performs sentiment analysis and NER before delivering output through a Discord interface. 🚀
This bot is not only an incredibly powerful realtime scraper, it also incorporates a Natural Language Processing Engine powered by Spacy, NLTK and Gensim that effectively summarise the news of the day.
The bot currently retrieves information from the following sources:
- The Star
- Malay Mail
- Malaysiakini- To be released soon
- The New York Times API
- Rapid News API for International Headlines
Word Clouds with the day's key players
Curated National Headlines
Football Headlines
Functionality that is available but not deployed:
- Redis caching- Instead of scraping upon a call to the bot, scrape periodically and cache news stories.
How to use this bot?
If you are running your local Python interpretation through virtual environments, create a new one (I use virtualenvwrapper). Clone this repository and create a .env
file that contains the following:
DISCORD_TOKEN =
DISCORD_GUILD =
NEWS_API_KEY =
NYTIMES_API_KEY =
VERSION = DEVELOPMENT or PRODUCTION
and run:
pip3 install requirements.txt
then
python bot.py
If you're interested in extending the news organisations this scrapes from, feel free to submit pull requests. Cheers!