From 1d986edd65456fecc8b757ee0786116e8d05024c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 21 Oct 2011 22:19:01 +0530 Subject: [PATCH] Fix #879459 (Updated recipe for The Japan Times) --- recipes/japan_times.recipe | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/japan_times.recipe b/recipes/japan_times.recipe index 229d5e4035..f5b90f2c05 100644 --- a/recipes/japan_times.recipe +++ b/recipes/japan_times.recipe @@ -44,7 +44,11 @@ class JapanTimes(BasicNewsRecipe): return rurl.partition('?')[0] def print_version(self, url): - return url.replace('/cgi-bin/','/print/') + if '/rss/' in url: + return url.replace('.jp/rss/','.jp/print/') + if '/text/' in url: + return url.replace('.jp/text/','.jp/print/') + return url def preprocess_html(self, soup): for item in soup.findAll(style=True):