From fd1501a0c000834cc78b8ba90780aff6edcd4c05 Mon Sep 17 00:00:00 2001 From: pictuga Date: Wed, 25 Sep 2013 11:49:45 +0200 Subject: [PATCH] Check relative url earlier --- morss.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/morss.py b/morss.py index dc77e7e..a461708 100644 --- a/morss.py +++ b/morss.py @@ -273,6 +273,9 @@ def Fill(item, cache, feedurl='/', fast=False): log(item.link) + # check relative urls + item.link = urlparse.urljoin(feedurl, item.link) + # feedburner feeds.NSMAP['feedburner'] = 'http://rssnamespace.org/feedburner/ext/1.0' match = item.xval('feedburner:origLink') @@ -295,9 +298,6 @@ def Fill(item, cache, feedurl='/', fast=False): item.link = match[0] log(item.link) - # check relative urls - item.link = urlparse.urljoin(feedurl, item.link) - # check unwanted uppercase title if len(item.title) > 20 and item.title.isupper(): item.title = item.title.title()