From: Selena Deckelmann Date: Tue, 2 Jun 2009 20:42:29 +0000 (-0700) Subject: Update for wordpress.com blogs X-Git-Url: http://git.postgresql.org/gitweb/static/session/%7B%7Bsession.id%7D%7D-%7B%7Bsession.title%7Cslugify%7D%7D?a=commitdiff_plain;h=94988c787f699212e583ef2affad04b029cabd0f;p=hamn.git Update for wordpress.com blogs --- diff --git a/aggregator.py b/aggregator.py index 20de7f7..d1f03da 100755 --- a/aggregator.py +++ b/aggregator.py @@ -72,11 +72,13 @@ class Aggregator: # much shorter. Other blog software store what we want in the summary # attribute. So let's just try one after another until we hit something. try: - txt = entry.content[0].value + # Fix for broken wordpress.com blogs + if entry.content[0].has_key('base'): + txt = entry.content[0].value + else: + txt = entry.summary except: txt = '' - if txt == '' and entry.has_key('summary'): - txt = entry.summary if txt == '': # Not a critical error, we just ignore empty posts print "Failed to get text for entry at %s" % entry.link