Debian Codegraph @

recipes/thebell.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 TheBell(BasicNewsRecipe):
8 title = 'The Bell'
9 __author__ = 'bugmen00t'
10 description = '\u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0438\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u044e\u043b\u043b\u0435\u0442\u0435\u043d\u044c, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0435\u0435\u0441\u044f \u043d\u0430 \u0431\u0438\u0437\u043d\u0435\u0441-\u043d\u043e\u0432\u043e\u0441\u0442\u044f\u0445.' # noqa: E501
11 publisher = '\u0415\u043b\u0438\u0437\u0430\u0432\u0435\u0442\u0430 \u041e\u0441\u0435\u0442\u0438\u043d\u0441\u043a\u0430\u044f, \u0418\u0440\u0438\u043d\u0430 \u041c\u0430\u043b\u043a\u043e\u0432\u0430' # noqa: E501
12 category = 'newspaper'
13 cover_url = 'https://thebell.io/wp-content/uploads/2018/03/thebell-cover.png'
14 language = 'ru'
15 no_stylesheets = True
16 remove_javascript = False
17 auto_cleanup = False
18 oldest_article = 7
19 max_articles_per_feed = 20
20
21 remove_tags_before = dict(name='h1')
22
23 remove_tags_after = dict(name='div', attrs={'class': 'post'})
24
25 remove_tags = [
26 dict(name='div', attrs={'class': 'post_bottom ng-tns-c84-1 ng-star-inserted'}),
27 dict(name='div', attrs={'class': 'post_tags ng-tns-c84-1 ng-star-inserted'}),
28 dict(name='div', attrs={'class': 'post_subscribe ng-tns-c84-1 ng-star-inserted'}),
29 dict(name='div', attrs={'class': 'author__content_image author__content_image_small ng-star-inserted'}),
30 dict(name='div', attrs={'class': 'email email_small ng-star-inserted'}),
31 dict(name='div', attrs={'class': 'post_share ng-tns-c84-1'}),
32 dict(name='div', attrs={'class': 'social_media'}),
33 ]
34
35 feeds = [('The Bell', 'https://thebell.io/feed')]