Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
This small piece of code can print the title and links of rss feed link provided in command line.
import feedparser
import sys
if len(sys.argv) < 2:
print("USAGE: python <rss feed link>")
rss_url = sys.argv[1]
print("TITLE"," ","LINK")
feed = feedparser.parse( rss_url )
y = len(feed[ "items" ])
for x in range(0,y):
print('\033[91m'+feed[ "items" ][x][ "title" ] + '\033[0m', "-", feed[ "items" ][x][ "link" ])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment