-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnews_pipline.py
More file actions
19 lines (16 loc) · 822 Bytes
/
Copy pathnews_pipline.py
File metadata and controls
19 lines (16 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
####################################################################################
# Main Function to run backend script after user init the plugin
####################################################################################
from news_scraper import news_scrape
from find_related import find_related_articles
def news_pipline(url):
"""
Description:
Ingest a list of news article with opposing views from the newssite that sit
at the different side of the political scale.
"""
num_keyword = 3
(news,keyword) = news_scrape(url, num_keyword)
return find_related_articles(news, keyword)
if __name__ == "__main__":
news_pipline("https://www.thestar.com/business/2015/11/05/exxonmobil-investigated-over-claims-it-misled-public-about-climate-change.html")