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

How to parse a xml feed using feed parser python?

$
0
0

Im trying to parse a feed in python using feedparser. But all I get is None returned. Im not sure what im missing. Here is my code:

import feedparserdef rss(self):    rss = 'https://news.google.com/news?q=fashion&output=rss'    feed = feedparser.parse(rss)    for key in feed.entries:         return key.title

If you think there is a better rss/xml feed parse. Please let me know. (Im new to python)

print(key) displays noneand print(len(feed.entries)) also displays none

print(feed){'feed': {}, 'entries': [], 'bozo': 1, 'bozo_exception': URLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)'),)}print(feedparser)<module 'feedparser' from '/Users/User_name/python-projects/my_env/lib/python3.6/site-packages/feedparser.py'>

Viewing all articles
Browse latest Browse all 106

Latest Images

Trending Articles



Latest Images

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