diff backend/AbstractFeedUpdater.py @ 167:a3c945ce434c

adjust the sqlalchemy backend to the changes in AbstractFeedUpdater
author dirk
date Mon, 05 Sep 2011 19:39:08 +0200
parents 04c3b9796b89
children 2f2016a10f7d
line wrap: on
line diff
--- a/backend/AbstractFeedUpdater.py	Sat Sep 03 04:12:35 2011 +0200
+++ b/backend/AbstractFeedUpdater.py	Mon Sep 05 19:39:08 2011 +0200
@@ -13,11 +13,6 @@
     Subclasses need to implement creating and storing the new feed entries.
     '''
 
-    @staticmethod
-    def parseFeed(url):
-        proxy = ProxyHandler( {"http":"http://your.proxy.here:8080/"} )
-        return feedparser.parse(url, handlers = [proxy])
-
     def __init__(self, preferences):
         self.preferences = preferences
 
@@ -25,8 +20,8 @@
         self.feed = feed
         log.info("updating " + feed.rss_url)
         result = self._retrieveFeed()
+        self._setFeedTitle(result)
         self._processEntries(result)
-        self._setFeedTitle(result)
 
     def _retrieveFeed(self):
         if self.preferences.isProxyConfigured():
@@ -34,6 +29,7 @@
             proxyHandler = ProxyHandler({"http" : proxyUrl})
             result = feedparser.parse(self.feed.rss_url, handlers=[proxyHandler])
         else:
+            # when updating to python3 see http://code.google.com/p/feedparser/issues/detail?id=260
             result = feedparser.parse(self.feed.rss_url)
         # bozo flags if a feed is well-formed.
 #        if result["bozo"] > 0: