From dbf5dc7e690ec45fb66875ecb99889926a8774d9 Mon Sep 17 00:00:00 2001 From: Henrik Holm Date: Sat, 8 Nov 2025 23:40:17 +0100 Subject: [PATCH] Improve parsing by looking for other HTML tags --- recipes/fokus.recipe | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/fokus.recipe b/recipes/fokus.recipe index 0313cfc6df..8b6471ca9a 100644 --- a/recipes/fokus.recipe +++ b/recipes/fokus.recipe @@ -45,7 +45,8 @@ class Fokus(BasicNewsRecipe): dict(name='p', class_='article-metadata'), # Dynamically created by the recipe. dict(name='figure', class_='Single__thumbnail'), # Image of "Single" type articles. dict(name='figure', class_='Longread__thumbnail'), # Image of "Longread" type articles. - dict(name='div', class_='sesamy-protected-content'), # Article body. + dict(name='div', class_='Single__content'), # Article body of "Single" type articles. + dict(name='div', class_='Longread__content'), # Article body of "Longread" type articles. ] def extract_cover_url(self, a_tag) -> str: @@ -230,7 +231,7 @@ class Fokus(BasicNewsRecipe): ''' self.log(f'Assigning each of the {len(articles)} articles to a section...') section_to_articles = {} - for article_url, article_dict in articles.items(): + for _, article_dict in articles.items(): section_title = article_dict['category'] if section_title not in section_to_articles: section_to_articles[section_title] = []