From 93f971896b7e8c51ee2e2c3ae17d7d627cf38f44 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 28 Apr 2013 10:10:58 +0200 Subject: [PATCH] Improved feedsportal url recognition. --- morss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/morss.py b/morss.py index fb350e1..d6fe98c 100644 --- a/morss.py +++ b/morss.py @@ -290,8 +290,8 @@ def Fill(rss, cache): match = re.search('/([0-9a-zA-Z]{20,})/story01.htm$', item.link) if match: url = match.groups()[0].split('0') - t = {'A':'0', 'B':'.', 'C':'/', 'D':'?', 'E':'-', 'I':'_', 'L':'ww', 'S':'w.', 'N':'.com', 'O':'.co.uk'} - item.link = 'http://' + "".join([(t[s[0]] if s[0] in t else "=") + s[1:] for s in url[1:]]) + t = {'A':'0', 'B':'.', 'C':'/', 'D':'?', 'E':'-', 'I':'_', 'L':'http://', 'S':'www.', 'N':'.com', 'O':'.co.uk'} + item.link = "".join([(t[s[0]] if s[0] in t else "=") + s[1:] for s in url[1:]]) log(item.link) if '{http://rssnamespace.org/feedburner/ext/1.0}origLink' in item: item.link = item['{http://rssnamespace.org/feedburner/ext/1.0}origLink']