Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

renamed rss to rss_count and added rss.py to show details of rss feed

  • Loading branch information...
commit 3b54ab406f6a5b8b605703535028e53c44b380b2 1 parent 5abbc4c
Greg Allen authored
Showing with 15 additions and 2 deletions.
  1. +4 −2 rss.py
  2. +11 −0 rss_count.py
View
6 rss.py
@@ -2,10 +2,12 @@
import feedparser
import sys
-rss_feed = sys.argv[1]#'http://www.instapaper.com/rss/210994/5Da2BWwf1zMmuZMUHCfEGH9Xxk'
+rss_feed = sys.argv[1]
d = feedparser.parse(rss_feed)
-print "%s %s" % (d.feed.title, len(d['entries']))
+print "%s (%d)" % (d.feed.title, len(d['entries']))
+for entry in d['entries']:
+ print entry.title.encode('ascii', 'ignore')
View
11 rss_count.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+import feedparser
+import sys
+
+rss_feed = sys.argv[1]
+
+d = feedparser.parse(rss_feed)
+
+print "%s %s" % (d.feed.title, len(d['entries']))
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.