Agent-Wallie

所属分类:特征抽取
开发工具:Python
文件大小:3266KB
下载次数:0
上传日期:2021-05-07 15:19:57
上 传 者sh-1993
说明:  一个电报机器人,它通过网络抓取新闻网站(例如黑客新闻)的文章、新闻更新和研究论文,用户可以...
(A Telegram bot that web scrapes a News Site (e.g Hacker News) for articles, news updates and research papers a user might be interested in. It goes ahead to summarize the content of each paper, then finally submit a report back to the user showing the title, summary and link of each article. The bot also has the ability to send a copy to user)

文件列表:
Assets (0, 2021-05-07)
Assets\Studying-for-finals.jpeg (44885, 2021-05-07)
Assets\WhatsApp_feed.png (1130810, 2021-05-07)
Assets\ab9770864443827ea8b21382e917f936.jpg (42794, 2021-05-07)
Assets\add.png (351024, 2021-05-07)
Assets\added.png (318623, 2021-05-07)
Assets\bot.png (244256, 2021-05-07)
Assets\bun-alert.png (56603, 2021-05-07)
Assets\feeds.png (476098, 2021-05-07)
Assets\no_news_for_me.png (67927, 2021-05-07)
Assets\preferences.png (396233, 2021-05-07)
Assets\start.png (445296, 2021-05-07)
LICENSE (1067, 2021-05-07)
Procfile (26, 2021-05-07)
__pycache__ (0, 2021-05-07)
__pycache__\article_summarizer.cpython-37.pyc (2262, 2021-05-07)
__pycache__\jobs.cpython-37.pyc (1367, 2021-05-07)
__pycache__\main_db.cpython-37.pyc (3547, 2021-05-07)
__pycache__\news_bot.cpython-37.pyc (1971, 2021-05-07)
__pycache__\post_news.cpython-37.pyc (527, 2021-05-07)
__pycache__\scraper.cpython-37.pyc (1957, 2021-05-07)
__pycache__\summarizer.cpython-37.pyc (2382, 2021-05-07)
__pycache__\test_thread.cpython-37.pyc (1861, 2021-05-07)
__pycache__\wallie.cpython-37.pyc (4315, 2021-05-07)
article_summarizer.py (3141, 2021-05-07)
jobs.py (955, 2021-05-07)
post_news.py (568, 2021-05-07)
requirements.txt (124, 2021-05-07)
scraper.py (2586, 2021-05-07)
wallie.py (6924, 2021-05-07)

# Wallie§ the News Reporter ![Python 3.7](https://img.shields.io/badge/Made_With-Python_3.7-green?style=for-the-badge&logo=appveyor) ![GitHub repo size](https://img.shields.io/github/repo-size/squash-bit/Automate-Whatsapp-News) ![GitHub stars](https://img.shields.io/github/stars/squash-bit/Automate-Whatsapp-News?style=social) With the rapid pace of innovation in the tech industry, it can be difficult for tech professionals, programmers, and developers to keep their skills current. That being said, reading technology news and blogs every day is one of the best ways to keep up to date on the latest trends and skills needed in tech. ![Study for Finals](https://github.com/squash-bit/Automate-Whatsapp-News/blob/master/Assets/Studying-for-finals.jpeg?raw=true) Finding a few good articles or blogs to read from, especially ones that are relevant to your area of expertise at your spare time, can be daunting sometimes not to talk of the time spent scrolling through a plethora of articles that don't interest you. What mostly annoys me at times, is the fact that an individual spends his/her precious time to read an article with a "click-bait" title only to realize that the contents has nothing to do with its title! Hmn... ![alert](https://github.com/squash-bit/Automate-Whatsapp-News/blob/master/Assets/bun-alert.png?raw=true) So, after a long time of pain, I decided to create a bot that gets me the right news update I need at a certain time. Yes, I know there are so many options out there to give you and I the same result we need or an even more optimal result but, I just felt like solving my own problem without leveraging on the other Giants like medium, and co... ‘ Uniquely for me, I am building a bot that recommends news update for the user based on two variables; **user's preference** and **keywords** in the article (not title because sometimes it can mislead). Then returns to user the "title", "summary of content", and its "link" through Telegram. First of all, I webscraped and cleaned data from a site, like [Hacker News](https://news.ycombinator.com/news) to get title and link of recent news available. By reading from the link of an article, I figured out next the keywords (list of words which frequently most occurs in the content) of each article. After that, I check whether an item in the preference list given by the user corresponds to any keyword. If it does, get me the summary of that article and update the user through Telegram and Whatsapp (if the need be, using the [Twilio sandbox](https://www.twilio.com/)). whew! ## Pre-requisites Before you begin, ensure you have met the following requirements: * A virtualenv ```python3 -m venv ``` * You have the version of modules in the requirements.txt file. `requirements.txt` installed in the virtualenv Or, if not ... * cd to the directory where requirements.txt is located * activate your virtualenv On Windows, run: ```\Scripts\activate.bat``` On Unix or MacOS, run: ```source /bin/activate``` * run: `pip install -r requirements.txt` in your shell ## Description `scraper.py` Basically webscrapes data from the hackernews and get the relevant keywords from each article. `article_summarizer.py` summarizes the content of the article `job.py` schedules a job or a function to run at the background whilst the main thread runs `wallie.py` is the brain behind the telegram bot `post_news.py` further post updates to its user through whatsapp ## Check it out
Start Bot Add to preference list
Item added View preference list
When there's no news update for user after searching. no news feed But when there's news...
Update me on telegram Update me on whatsapp
updates on telegram updates on whatsapp
check out the [Wallie§](https://telegram.me/Jnragbo_Bot) in action or run the wallie.py script ``` python3 wallie.py ``` You can decide to host the code on [heroku](https://www.heroku.com/) to deploy your version online

近期下载者

相关文件


收藏者