Closed dmpop closed 7 years ago
http://pythonhosted.org/feedparser/
#!/usr/bin/env python3 import feedparser rss = feedparser.parse('http://www.amateurphotographer.co.uk/feed') count = 1 html_feed = [] for post in rss.entries: if count < 5: item = '<a href="'+ post.link +'>'+ post.title + '</a><br />' html_feed.append(item) count += 1 print(rss.feed.title) print('\n'.join(html_feed))
http://pythonhosted.org/feedparser/