From 8209f243bbdd64f09d5ef5081962f863360340ad Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 11 Jan 2014 18:15:36 +0100 Subject: [PATCH] Fix rss-redirection code And add log, which was lost when splitting functions (which made this fix needed) --- morss/morss.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/morss/morss.py b/morss/morss.py index 66002bd..10bec36 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -552,7 +552,8 @@ def Fetch(url, cache, options): match = lxml.html.fromstring(xml).xpath("//link[@rel='alternate'][@type='application/rss+xml' or @type='application/atom+xml']/@href") if len(match): link = urlparse.urljoin(url, match[0]) - return Fetch(link, cachePath, options) + log('rss redirect: %s' % link) + return Fetch(link, cache.new(link), options) else: log('no-link html') raise MorssException('Link provided is an HTML page, which doesn\'t link to a feed')