From 77efdeaa53f0d07101f1745b0b85d7d96a8e5b20 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 9 Nov 2010 13:30:22 -0700 Subject: [PATCH] Fix #7478 (Suggested modification for Irish Times news feed) --- resources/recipes/irish_times.recipe | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/resources/recipes/irish_times.recipe b/resources/recipes/irish_times.recipe index ab37271638..14f31cf45f 100644 --- a/resources/recipes/irish_times.recipe +++ b/resources/recipes/irish_times.recipe @@ -33,13 +33,14 @@ class IrishTimes(BasicNewsRecipe): ('Letters', 'http://www.irishtimes.com/feeds/rss/newspaper/letters.rss'), ] - def print_version(self, url): - if url.count('rss.feedsportal.com'): - u = url.replace('0Bhtml/story01.htm','_pf0Bhtml/story01.htm') - else: - u = url.replace('.html','_pf.html') - return u + if url.count('rss.feedsportal.com'): + u = 'http://www.irishtimes.com' + \ + (((url[69:].replace('0C','/')).replace('0A','0'))).replace('0Bhtml/story01..htm','_pf.html') + else: + u = url.replace('.html','_pf.html') + return u + def get_article_url(self, article): return article.link