Revert "Update for wordpress.com blogs"
authorMagnus Hagander <magnus@hagander.net>
Tue, 16 Jun 2009 17:49:14 +0000 (19:49 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 16 Jun 2009 17:49:14 +0000 (19:49 +0200)
Breaks on several of our blogs.

This reverts commit 94988c787f699212e583ef2affad04b029cabd0f.

aggregator.py

index d1f03daf492c86c3e8df9759a91bac075d0d3a62..20de7f7590ecf6bc2540f83d9a85aeae18acdb6e 100755 (executable)
@@ -72,13 +72,11 @@ 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:
-                               # Fix for broken wordpress.com blogs
-                               if entry.content[0].has_key('base'):
-                                       txt = entry.content[0].value
-                               else:
-                                       txt = entry.summary
+                               txt = entry.content[0].value
                        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