From 503040299563bda5d37fdff0c721bfd9abd8adbb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 14 Jan 2010 20:37:28 -0700 Subject: [PATCH] Fix language codes for various recipes --- resources/recipes/corren2.recipe | 5 +++-- resources/recipes/houston_chronicle.recipe | 2 +- resources/recipes/le_temps.recipe | 2 +- resources/recipes/national_post.recipe | 1 + resources/recipes/nejm.recipe | 1 + resources/recipes/nzherald.recipe | 1 + resources/recipes/welt.recipe | 1 + 7 files changed, 9 insertions(+), 4 deletions(-) diff --git a/resources/recipes/corren2.recipe b/resources/recipes/corren2.recipe index 944e77b9e2..494be88f10 100644 --- a/resources/recipes/corren2.recipe +++ b/resources/recipes/corren2.recipe @@ -2,8 +2,9 @@ from calibre.web.feeds.news import BasicNewsRecipe class AdvancedUserRecipe1255797795(BasicNewsRecipe): title = u'Corren' + language = 'sv' __author__ = 'Jonas Svensson' - simultaneous_downloads = 1 + simultaneous_downloads = 1 no_stylesheets = True oldest_article = 7 max_articles_per_feed = 100 @@ -35,4 +36,4 @@ class AdvancedUserRecipe1255797795(BasicNewsRecipe): url = url.replace("ostergotland/mjolby/artikel.aspx", "Print.aspx") url = url.replace("ostergotland/motala/artikel.aspx", "Print.aspx") return url.replace("nyheter/artikel.aspx", "Print.aspx") - + diff --git a/resources/recipes/houston_chronicle.recipe b/resources/recipes/houston_chronicle.recipe index 2b0e653c25..77e35dfc0c 100644 --- a/resources/recipes/houston_chronicle.recipe +++ b/resources/recipes/houston_chronicle.recipe @@ -5,7 +5,7 @@ class HoustonChronicle(BasicNewsRecipe): title = u'The Houston Chronicle' description = 'News from Houston, Texas' __author__ = 'Kovid Goyal' - language = 'US' + language = 'en' timefmt = ' [%a, %d %b, %Y]' no_stylesheets = True diff --git a/resources/recipes/le_temps.recipe b/resources/recipes/le_temps.recipe index 38b9fdedb4..c33d9a51d2 100644 --- a/resources/recipes/le_temps.recipe +++ b/resources/recipes/le_temps.recipe @@ -20,7 +20,7 @@ class LeTemps(BasicNewsRecipe): recursions = 1 encoding = 'UTF-8' match_regexps = [r'http://www.letemps.ch/Page/Uuid/[-0-9a-f]+\|[1-9]'] - lang = 'fr' + language = 'fr' keep_only_tags = [dict(name='div', attrs={'id':'content'}), dict(name='div', attrs={'class':'story'}) diff --git a/resources/recipes/national_post.recipe b/resources/recipes/national_post.recipe index a770236585..d9743d5980 100644 --- a/resources/recipes/national_post.recipe +++ b/resources/recipes/national_post.recipe @@ -8,6 +8,7 @@ class NYTimes(BasicNewsRecipe): description = 'Canadian national newspaper' timefmt = ' [%d %b, %Y]' needs_subscription = False + language = 'en_CA' no_stylesheets = True #remove_tags_before = dict(name='h1', attrs={'class':'heading'}) diff --git a/resources/recipes/nejm.recipe b/resources/recipes/nejm.recipe index d41fa5a3e2..415377b5c2 100644 --- a/resources/recipes/nejm.recipe +++ b/resources/recipes/nejm.recipe @@ -8,6 +8,7 @@ class NYTimes(BasicNewsRecipe): description = 'Medical news' timefmt = ' [%d %b, %Y]' needs_subscription = True + language = 'en' no_stylesheets = True remove_tags_before = dict(name='div', attrs={'align':'center'}) diff --git a/resources/recipes/nzherald.recipe b/resources/recipes/nzherald.recipe index 08f66e2f56..1a962ffacb 100644 --- a/resources/recipes/nzherald.recipe +++ b/resources/recipes/nzherald.recipe @@ -6,6 +6,7 @@ class NewZealandHerald(BasicNewsRecipe): __author__ = 'Krittika Goyal' description = 'Daily news' timefmt = ' [%d %b, %Y]' + language = 'en_AU' no_stylesheets = True remove_tags_before = dict(name='div', attrs={'class':'contentContainer left eight'}) diff --git a/resources/recipes/welt.recipe b/resources/recipes/welt.recipe index 4c90853c82..59d900f53e 100644 --- a/resources/recipes/welt.recipe +++ b/resources/recipes/welt.recipe @@ -12,6 +12,7 @@ class weltDe(BasicNewsRecipe): title = 'Weltonline' description = 'german newspaper' + language = 'de' __author__ = 'Oliver Niesner' use_embedded_content = False timefmt = ' [%d %b %Y]'