Debian Codegraph @

recipes/osvitaua.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 Osvita(BasicNewsRecipe):
8 title = '\u041e\u0441\u0432\u0456\u0442\u0430.ua'
9 __author__ = 'bugmen00t'
10 description = '\u0423\u0441\u0435 \u043f\u0440\u043e \u043e\u0441\u0432\u0456\u0442\u0443 \u0432 \u0423\u043a\u0440\u0430\u0457\u043d\u0456 \u0442\u0430 \u0437\u0430 \u043a\u043e\u0440\u0434\u043e\u043d\u043e\u043c: \u0442\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441, \u043f\u0440\u0438\u0441\u0432\u044f\u0447\u0435\u043d\u0438\u0439 \u043e\u0441\u0432\u0456\u0442\u0456 \u0432 \u0423\u043a\u0440\u0430\u0457\u043d\u0456 \u0442\u0430 \u0437\u0430 \u0457\u0457 \u043c\u0435\u0436\u0430\u043c\u0438, \u0454 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0438\u043c \u0434\u0436\u0435\u0440\u0435\u043b\u043e\u043c \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u0457 \u0443 \u0446\u0456\u0439 \u0441\u0444\u0435\u0440\u0456.' # noqa: E501
11 publisher = '\u041e\u0441\u0432\u0456\u0442\u0430.ua'
12 category = 'blog'
13 cover_url = 'http://osvita.ua/doc/i/Contacts-logo.jpg'
14 language = 'uk'
15 no_stylesheets = False
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='div', attrs={'id': 'body'})
22
23 remove_tags_after = dict(name='div', attrs={'id': 'body'})
24
25 remove_tags = [
26 # Unable to fetch images, removing them completely
27 dict(name='img'),
28 dict(name='p', attrs={'class': 'info'}),
29 ]
30
31 feeds = [('\u041d\u043e\u0432\u0438\u043d\u0438', 'https://osvita.ua/rss/')]
32
33 def print_version(self, url):
34 return url + 'print'