Debian Codegraph @

recipes/pravda_ukraine.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 PravdaUAEN(BasicNewsRecipe):
8 title = 'Ukrainska Pravda'
9 __author__ = 'bugmen00t'
10 description = ' Ukrainian online newspaper founded by Georgiy Gongadze with an emphasis on the politics of Ukraine. '
11 publisher = 'pravda.com.ua'
12 category = 'newspaper'
13 cover_url = 'https://img.pravda.com/images/up_for_fb.gif'
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 = 30
20
21 remove_tags_before = dict(name='h1')
22
23 remove_tags_after = dict(name='article', attrs={'class': 'post'})
24
25 remove_tags = [
26 dict(name='footer'),
27 dict(name='div', attrs={'class': 'nts-video-wrapper'}),
28 dict(name='div', attrs={'class': 'post-report'}),
29 dict(name='div', attrs={'class': 'post__report'}),
30 dict(name='div', attrs={'class': 'social_item'}),
31 dict(name='div', attrs={'class': 'sidebar'}),
32 dict(name='div', attrs={'class': 'article-announcement-photo article-announcement-photo-block-1'}),
33 dict(name='div', attrs={'class': 'statistic-bottom-block statistic-top-block'}),
34 dict(name='div', attrs={'class': 'modal modal_search modal_white'}),
35 dict(name='div', attrs={'class': 'modal_auth modal_white'}),
36 dict(name='div', attrs={'class': 'main_logo'}),
37 dict(name='div', attrs={'class': 'footer_banner'}),
38 dict(name='nav', attrs={'class': 'block block_menu'}),
39 dict(name='div', attrs={'class': 'pagewrap page-point'}),
40 dict(name='div', attrs={'class': 'modal fade search-popup'}),
41 dict(name='div', attrs={'data-vr-zone': 'Mobile main menu'}),
42 dict(name='aside'),
43 dict(name='div', attrs={'class': 'block_related'}),
44 dict(name='div', attrs={'class': 'block_comments'}),
45 dict(name='div', attrs={'class': 'post_tags'}),
46 dict(name='div', attrs={'class': 'post__tags'}),
47 ]
48
49 feeds = [
50 ('All materials', 'https://www.pravda.com.ua/eng/rss/'),
51 ('Top news', 'https://www.pravda.com.ua/eng/rss/view_mainnews/'),
52 ('News', 'https://www.pravda.com.ua/eng/rss/view_news/'),
53 ('Articles', 'https://www.pravda.com.ua/eng/rss/view_pubs/'),
54 ]