Debian Codegraph @

recipes/currenttime.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 CurrentTime(BasicNewsRecipe):
8 title = '\u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f'
9 __author__ = 'bugmen00t'
10 description = '\u0422\u0435\u043b\u0435\u043a\u0430\u043d\u0430\u043b "\u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0412\u0440\u0435\u043c\u044f" \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u0445 \u0438 \u0437\u043b\u043e\u0431\u043e\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0442\u0435\u043c\u0430\u0445, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438 \u0442\u043e, \u0447\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043c\u0435\u0441\u0442\u043d\u044b\u0435 \u0421\u041c\u0418: \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0431\u0435\u0437 \u0446\u0435\u043d\u0437\u0443\u0440\u044b, \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u043c\u0435\u043d \u043c\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c.' # noqa: E501
11 publisher = 'RFE/RL ("\u0420\u0430\u0434\u0438\u043e \u0421\u0432\u043e\u0431\u043e\u0434\u043d\u0430\u044f \u0415\u0432\u0440\u043e\u043f\u0430"/"\u0420\u0430\u0434\u0438\u043e \u0421\u0432\u043e\u0431\u043e\u0434\u0430") \u043f\u0440\u0438 \u0443\u0447\u0430\u0441\u0442\u0438\u0438 VoA ("\u0413\u043e\u043b\u043e\u0441 \u0410\u043c\u0435\u0440\u0438\u043a\u0438")' # noqa: E501
12 category = 'newspaper'
13 cover_url = 'https://www.currenttime.tv/Content/responsive/RFE/ru-RU-TV/img/top_logo_news.png'
14 language = 'ru'
15 no_stylesheets = False
16 remove_javascript = False
17 auto_cleanup = False
18 remove_empty_feeds = True
19 oldest_article = 14
20 max_articles_per_feed = 20
21
22 remove_tags_before = dict(name='h1')
23
24 remove_tags_after = dict(name='div', attrs={'class': 'body-container'})
25
26 remove_tags = [
27 dict(name='div', attrs={'class': 'publishing-details '}),
28 dict(name='div', attrs={'class': 'separator'}),
29 dict(name='div', attrs={'class': 'links'}),
30 dict(name='div', attrs={'class': 'share--box'}),
31 dict(name='aside'),
32 dict(name='div', attrs={'class': 'media-block also-read'}),
33 dict(name='div', attrs={'class': 'media-block-wrap'}),
34 dict(name='div', attrs={'class': 'media-download'}),
35 dict(name='div', attrs={'class': 'wsw__embed'}),
36 dict(name='div', attrs={'class': 'share--box'}),
37 dict(name='div', attrs={'class': 'prog-hdr'}),
38 dict(name='div', attrs={'class': 'dropdown__holder'}),
39 dict(name='div', attrs={'id': 'ymla-section'}),
40 dict(name='div', attrs={'id': 'comments'}),
41 dict(name='a', attrs={'class': 'back-to-top-link'}),
42 dict(name='footer'),
43 dict(name='li', attrs={'class': 'socials block-socials'}),
44 dict(name='div', attrs={'data-sp_api': 'pangea-video'}),
45 ]
46
47 feeds = [
48 ('\u041d\u043e\u0432\u043e\u0441\u0442\u0438', 'https://www.currenttime.tv/api/zgbip_e_tpp_'),
49 ('\u0421\u0435\u043c\u044c \u0441\u043e\u0440\u043e\u043a', 'https://www.currenttime.tv/api/ztktpyeimupt'),
50 ('\u042d\u043a\u0441\u043a\u043b\u044e\u0437\u0438\u0432', 'https://www.currenttime.tv/api/zpyomoe-rimi'),
51 ('\u0412\u044b\u0431\u043e\u0440 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0438', 'https://www.currenttime.tv/api/zqk-poekpbpo'),
52 ('\u0420\u043e\u0441\u0441\u0438\u044f', 'https://www.currenttime.tv/api/zuvmpvepo_pv'),
53 ('\u0423\u043a\u0440\u0430\u0438\u043d\u0430', 'https://www.currenttime.tv/api/zkvmptemo_pt'),
54 ('\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u044c', 'https://www.currenttime.tv/api/zvvmm_eoo_mt'),
55 ('\u0410\u0437\u0438\u044f', 'https://www.currenttime.tv/api/zbvtpqetoupq'),
56 ('\u0415\u0432\u0440\u043e\u043f\u0430', 'https://www.currenttime.tv/api/z-vmpoevo_pi'),
57 ('\u0410\u043c\u0435\u0440\u0438\u043a\u0430', 'https://www.currenttime.tv/api/zbvmpieto_pp'),
58 ('\u0411\u043b\u0438\u0436\u043d\u0438\u0439 \u0412\u043e\u0441\u0442\u043e\u043a', 'https://www.currenttime.tv/api/zrvtppeuqupm'),
59 ('\u041b\u043e\u043d\u0433\u0440\u0438\u0434\u044b', 'https://www.currenttime.tv/api/zibmmyejv_my'),
60 ('\u0420\u0435\u043f\u043e\u0440\u0442\u0430\u0436', 'https://www.currenttime.tv/api/zrpppqeujppo'),
61 (
62 '\u0420\u0435\u043f\u043e\u0440\u0442\u0430\u0436\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0412\u0435\u0447\u0435\u0440',
63 'https://www.currenttime.tv/api/zvrrmoeourmp',
64 ),
65 ('\u0418\u043d\u0442\u0435\u0440\u0432\u044c\u044e', 'https://www.currenttime.tv/api/zqpppoekjppi'),
66 ('\u0418\u043d\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u043a\u0430', 'https://www.currenttime.tv/api/zmqmpyebumpv'),
67 ]