Debian Codegraph @

recipes/nv_en.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 NV(BasicNewsRecipe):
8 title = 'NV (The New Voice of Ukraine)'
9 __author__ = 'bugmen00t'
10 description = 'Independent Ukrainian socio-political magazine and news resource.'
11 publisher = 'Vydavnychyy Dim Media-DK LLC'
12 category = 'magazine'
13 cover_url = 'https://static.nv.ua/shared/system/Article/posters/002/439/752/600x300/65730a3918ebad6c86167b53f2b3e98a.jpg'
14 language = 'en_UK'
15 no_stylesheets = False
16 remove_javascript = False
17 auto_cleanup = False
18 oldest_article = 30
19 max_articles_per_feed = 40
20
21 remove_tags_before = dict(name='h1')
22
23 remove_tags_after = dict(name='article')
24
25 remove_tags = [
26 dict(name='div', attrs={'class': 'article__content__footer'}),
27 dict(name='div', attrs={'class': 'article__head__additional_views'}),
28 dict(name='div', attrs={'class': 'show_two_positions '}),
29 dict(name='div', attrs={'class': 'media__also__news'}),
30 dict(name='div', attrs={'class': 'media__also__news_link'}),
31 dict(name='blockquote', attrs={'class': 'code'}),
32 dict(name='section', attrs={'class': 'article-share'}),
33 dict(name='div', attrs={'class': 'nts-video-wrapper'}),
34 dict(name='footer'),
35 dict(name='div', attrs={'class': 'longread_tags'}),
36 dict(name='div', attrs={'class': 'top_donate'}),
37 dict(name='div', attrs={'class': 'col-md-6 col-lg-3'}),
38 dict(name='div', attrs={'class': 'copyright'}),
39 dict(name='div', attrs={'class': 'media__video'}),
40 dict(name='div', attrs={'class': 'media__embed'}),
41 ]
42
43 feeds = [
44 ('All News', 'https://english.nv.ua/rss/all_english.xml'),
45 ('Life', 'https://english.nv.ua/rss/239.xml'),
46 ('Business', 'https://english.nv.ua/rss/238.xml'),
47 ('Nation', 'https://english.nv.ua/rss/237.xml'),
48 ('Opinion', 'https://english.nv.ua/rss/240.xml'),
49 ]