]> projects.mako.cc - iron-blogger/commitdiff
scan-feeds: Warn if we can't find someone's entries.
authorNelson Elhage <nelhage@mit.edu>
Mon, 18 Jan 2010 03:45:33 +0000 (22:45 -0500)
committerNelson Elhage <nelhage@mit.edu>
Mon, 18 Jan 2010 03:45:33 +0000 (22:45 -0500)
scan-feeds.py

index bc82608b1e21c94a7c29439bc5f56a4912c994cd..9801762b242691d2a66e56216a2e97d01624a9a4 100755 (executable)
@@ -2,6 +2,7 @@
 import yaml
 import feedparser
 import datetime
 import yaml
 import feedparser
 import datetime
+import sys
 from dateutil.parser import parse
 import dateutil.tz as tz
 
 from dateutil.parser import parse
 import dateutil.tz as tz
 
@@ -25,6 +26,8 @@ def get_link(post):
 
 def parse_feeds(weeks, uri):
     feed = feedparser.parse(uri)
 
 def parse_feeds(weeks, uri):
     feed = feedparser.parse(uri)
+    if not feed.entries:
+        print >>sys.stderr, "WARN: no entries for ", uri
     for post in feed.entries:
         date = parse_published(get_date(post))
 
     for post in feed.entries:
         date = parse_published(get_date(post))
 

Benjamin Mako Hill || Want to submit a patch?