From aa2d4c86574a70503ddd7d7fa42dfc795183d445 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Tue, 18 Mar 2025 19:53:02 +0530 Subject: [PATCH 1/2] Update lwn_free.recipe --- recipes/lwn_free.recipe | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/lwn_free.recipe b/recipes/lwn_free.recipe index 7cc7c473a4..6a3362fc0d 100644 --- a/recipes/lwn_free.recipe +++ b/recipes/lwn_free.recipe @@ -11,7 +11,10 @@ class LWNFree(BasicNewsRecipe): description = "LWN is published every Thursday. This recipe skips current week's articles (subscriber-only) and pulls free articles from previous week." oldest_article = 28 # So we can grab previous week articles. max_articles_per_feed = 100 - auto_cleanup = True + extra_css = '.FeatureByline { font-size:small; }' + + keep_only_tags = [dict(name='div', attrs={'class':['ArticleText', 'PageHeadline']})] + remove_tags = [dict(name='blockquote', attrs={'class':'ad'}), dict(name='form')] feeds = [ ('LWN Articles', 'https://lwn.net/headlines/Features'), @@ -35,6 +38,7 @@ class LWNFree(BasicNewsRecipe): # Count how many free weekly edition we passed if 'Weekly Edition' in article.title: weekly_count += 1 + remove_articles.append(article) # Remove all articles starting from 2nd free weekly edition if weekly_count > 1: From 3d735c910dc9f1cebbf86cb5857476a01176c0dc Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Tue, 18 Mar 2025 19:53:28 +0530 Subject: [PATCH 2/2] ... --- recipes/financial_times.recipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/financial_times.recipe b/recipes/financial_times.recipe index 5df77f095d..6374f1076d 100644 --- a/recipes/financial_times.recipe +++ b/recipes/financial_times.recipe @@ -12,7 +12,7 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes class ft(BasicNewsRecipe): title = 'Financial Times' - language = 'en' + language = 'en_GB' __author__ = 'Kovid Goyal' description = 'The Financial Times is one of the world’s leading news organisations, recognised internationally for its authority, integrity and accuracy.' oldest_article = 1.15