Mercurial > hg > Feedworm
diff backend/AbstractFeedUpdater.py @ 242:03e3ebb1d52f
Disable the use of a proxy when updating feeds - https traffic does not seem to work currently over a proxy.
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Mon, 08 Jun 2015 19:20:46 +0200 |
parents | e34c53a3e407 |
children | 51d2c3d55f4b |
line wrap: on
line diff
--- a/backend/AbstractFeedUpdater.py Tue Apr 28 02:50:57 2015 +0200 +++ b/backend/AbstractFeedUpdater.py Mon Jun 08 19:20:46 2015 +0200 @@ -25,13 +25,15 @@ self._processEntries(result) def _retrieveFeed(self): - if self.preferences.isProxyConfigured(): - proxyUrl = "http://%s:%i" % (self.preferences.proxyHost(), self.preferences.proxyPort()) - 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) + # Retrieving https connections over a proxy does not seem to work currently + #if self.preferences.isProxyConfigured(): + # proxyUrl = '{0}:{1}'.format(self.preferences.proxyHost(), self.preferences.proxyPort()) + # proxyHandler = ProxyHandler({'http': proxyUrl, 'https': 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) + print(result) # bozo flags if a feed is well-formed. # if result["bozo"] > 0: # raise FeedUpdateException()