Skip to content

Commit

Permalink
refactor: Update news_scraper.py to use article.keywords() instead of…
Browse files Browse the repository at this point in the history
… article.nlp()
  • Loading branch information
KenMwaura1 committed Sep 2, 2024
1 parent f386308 commit f9cfb7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions news_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def top_news(url):
article = news_source.articles[index]
article.download()
article.parse()
article.nlp()
article.keywords()
top_articles.append(article)
#print(article.title)
print(article.title)
for a in top_articles:
# Shorten the long article urls using bitly shortener lib
short_url = shortener.shorten_urls([a.url])
Expand Down

0 comments on commit f9cfb7e

Please sign in to comment.