Quantcast
Channel: Active questions tagged feedparser - Stack Overflow
Viewing all articles
Browse latest Browse all 105

How to build a simple RSS reader in Python 3.7?

$
0
0

I built a simple RSS reader on Python and it is not working.In addition, I want to get the featured image source link of every post and I didn't find a way to do so.

it shows me the Error: Traceback (most recent call last): File"RSS_reader.py", line 7, in feed_title = feed['feed']['title']

If there are some other RSS feeds that work fine. So I don't understand why there are some RSS feeds that are working and others that aren't

So I would like to understand why the code doesn't work and also how to get the featured image source link of a postI attached the code, is written on Python 3.7

import feedparserimport webbrowserfeed = feedparser.parse("https://finance.yahoo.com/rss/")feed_title = feed['feed']['title']feed_entries = feed.entriesfor entry in feed.entries:    article_title = entry.title    article_link = entry.link    article_published_at = entry.published # Unicode string    article_published_at_parsed = entry.published_parsed # Time object    article_author = entry.author    content = entry.summary    article_tags = entry.tags    print ("{}[{}]".format(article_title, article_link))    print ("Published at {}".format(article_published_at))    print ("Published by {}".format(article_author))    print("Content {}".format(content))    print("catagory{}".format(article_tags))

Viewing all articles
Browse latest Browse all 105

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>