View Single Post
Old 07-09-2023, 03:08 AM   #5
Villard
Connoisseur
Villard began at the beginning.
 
Posts: 74
Karma: 10
Join Date: May 2016
Device: Koreader running on Kobo Libra 2
It does not work.
I think the original website may have some problems because when I run the recipe with only the remove_tags instruction (see below), I get no news at all : the section page is blank and no article is included ! So this remove_tags instruction has an effect on the section page !!

If I replace the remove_tags instruction by an other one like remove_tags = [dict(name='div', class_='read-also')], it works fine : the section page is correct and the article page is cleaned as required.

I will investigate more.
Villard


class LaCroix(BasicNewsRecipe):
title = 'La Croix'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = False
no_stylesheets = True
needs_subscription = 'optional'
language = 'fr'

feeds = [
('Actualités : France', 'https://www.la-croix.com/RSS/UNIVERS_WFRA'),
]
remove_tags = dict(name='div', attrs={'class':['actions-under-image js-paywall-remove-element']})

Last edited by Villard; 07-09-2023 at 04:17 AM.
Villard is offline   Reply With Quote