Scraping News Articles Into One Single List With Newspaper Library In Python?
Dear Stackoverflow community! I would like to scrape news articles from the CNN RSS feed and get the link for each scraped article. This workes very well with the Python NewsPaper
Solution 1:
Try modifying your code like this and see if it works:
article_list = []
for entry in d.entries:
if hasattr(entry, 'published'):
article = {}
article['link'] = entry.link
article_list.append(article['link'])
Post a Comment for "Scraping News Articles Into One Single List With Newspaper Library In Python?"