From 222b1369e5a0b473bfecfb17115db01f00c757d9 Mon Sep 17 00:00:00 2001 From: pictuga Date: Wed, 15 May 2013 17:13:57 +0200 Subject: [PATCH] Support for relative urls in feed --- morss.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/morss.py b/morss.py index 404171d..0d5198c 100644 --- a/morss.py +++ b/morss.py @@ -340,6 +340,10 @@ def Fill(rss, cache, mode='feed'): item.link = "".join([(t[s[0]] if s[0] in t else "=") + s[1:] for s in url[1:]]) log(item.link) + # check relative urls + if urlparse.urlparse(item.link).netloc is '': + item.link = urlparse.urljoin(feedurl, item.link) + # check cache and previous errors if item.link in cache: content = cache.get(item.link)