Add rss2email v2.53 v2.53
authorAaron Swartz <me@aaronsw.com>
Thu, 26 Aug 2004 12:01:00 +0000 (12:01 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 15 Feb 2013 17:00:26 +0000 (12:00 -0500)
typo errors.

Downloaded from:

  http://web.archive.org/web/20050214084518/http://www.aaronsw.com/2002/rss2email/rss2email-2.53.py

rss2email.py

index 294144cf60f4bd6ab1076a065486eed5046e2d3d..9663d1adfa30084202dd9f34e81498a944940048 100644 (file)
@@ -10,7 +10,7 @@ Usage:
   list
   delete n
 """
-__version__ = "2.52"
+__version__ = "2.53"
 __author__ = "Aaron Swartz (me@aaronsw.com)"
 __copyright__ = "(C) 2004 Aaron Swartz. GNU GPL 2."
 ___contributors__ = ["Dean Jackson", "Brian Lalor", "Joey Hess", 
@@ -79,7 +79,6 @@ def send(fr, to, message):
                i.close(); o.close()
                del i, o
 
-
 ## html2text options ##
 
 # Use Unicode characters instead of their ascii psuedo-replacements
@@ -161,7 +160,7 @@ def getContent(entry, HTMLOK=0):
        if entry.get('summary_detail', {}):
                entry.content = entry.get('content', []) + [entry.summary_detail]
        
-       if entry.content:
+       if entry.get('content', []):
                if HTMLOK:
                        for c in entry.content:
                                if contains(c.type, 'html'): return ('HTML', c.value)
@@ -376,8 +375,7 @@ def run(num=None):
                                        content = getContent(entry, HTMLOK=HTML_MAIL)
                                        
                                        link = unu(entry.get('link', ""))
-                                       print entry.link
-
+                                       
                                        from_addr = unu(getEmail(r.feed, entry))
 
                                        message = (
@@ -422,7 +420,7 @@ def run(num=None):
                                print >>warn, "feedparser", feedparser.__version__
                                print >>warn, "html2text", h2t.__version__
                                print >>warn, "Python", sys.version
-                               print>>warn, "=== END HERE ==="
+                               print >>warn, "=== END HERE ==="
                                continue
 
        finally: