I Made a News Scrapper with 100 Lines of #python.
▻https://hackernoon.com/i-made-a-news-scrapper-with-100-lines-of-python-2e1de1f28f22?source=rss-
Everyday I take subway to my office, where my cellphone has no signal at all. But medium app won’t let me read stories offline, so I decided to make a news scrapper by myself.I didn’t want to make a very fancy application so I only completed the minimal prototype that can satisfy my needs. The concept is very simple:Find some news sourceScrap the news page with PythonParse the html and extract the content with BeautifulSoupConvert it to readable format then send an Email to myselfNow let me explain how I did each part.News Source: RedditPeople submit links to #reddit and vote them, so Reddit is a good news source to read news. Now the problem is: How to get a list of popular news everyday?Before thinking of web scrapping, we should try to find out whether the target website provides any API, (...)