Debian Codegraph @

recipes/ukrinform_fr.recipe

raw
1 #!/usr/bin/env python
2 # vim:fileencoding=utf-8
3
4 from calibre.web.feeds.news import BasicNewsRecipe
5
6
7 class UkrInform(BasicNewsRecipe):
8 title = 'UkrInform (Fran\u00e7ais)'
9 __author__ = 'bugmen00t'
10 description = 'Agence de presse nationale de l\u0027Ukraine. C\u2019est une source d\u0027informations sur la vie politique, \u00e9conomique, scientifique, culturelle et sociale en Ukraine et \u00e0 l\u0027\u00e9tranger.' # noqa: E501
11 publisher = 'Minist\u00e8re de la culture et de la politique d\u0027information de l\u0027Ukraine'
12 category = 'newspaper'
13 cover_url = 'https://static.ukrinform.com/photos/2022_05/thumb_files/630_360_1651819943-560.jpg'
14 language = 'fr'
15 no_stylesheets = True
16 remove_javascript = False
17 auto_cleanup = False
18 oldest_article = 7
19 max_articles_per_feed = 30
20
21 remove_tags_before = dict(name='article')
22
23 remove_tags_after = dict(name='article')
24
25 remove_tags = [
26 dict(name='aside'),
27 dict(name='img', attrs={'class': 'pixel'}),
28 dict(name='section', attrs={'class': 'read'}),
29 dict(name='div', attrs={'data-name': 'int_hidden'}),
30 ]
31
32 feeds = [
33 ('Derni\u00e8res infos', 'https://www.ukrinform.fr/rss/block-lastnews'),
34 ('Guerre', 'https://www.ukrinform.fr/rss/rubric-ato'),
35 ('Politique', 'https://www.ukrinform.fr/rss/rubric-polytics'),
36 ('\u00c9conomie', 'https://www.ukrinform.fr/rss/rubric-economy'),
37 ('D\u00e9fense', 'https://www.ukrinform.fr/rss/rubric-defense'),
38 ('Soci\u00e9t\u00e9 et culture', 'https://www.ukrinform.fr/rss/rubric-society'),
39 ('Sport', 'https://www.ukrinform.fr/rss/rubric-sports'),
40 ('Criminalit\u00e9', 'https://www.ukrinform.fr/rss/rubric-crime'),
41 ('Accidents', 'https://www.ukrinform.fr/rss/rubric-emergencies'),
42 ]