diff --git a/recipes/icons/liganet_ru.png b/recipes/icons/liganet_ru.png new file mode 100644 index 0000000000..cd15080f02 Binary files /dev/null and b/recipes/icons/liganet_ru.png differ diff --git a/recipes/icons/liganet_ua.png b/recipes/icons/liganet_ua.png new file mode 100644 index 0000000000..cd15080f02 Binary files /dev/null and b/recipes/icons/liganet_ua.png differ diff --git a/recipes/icons/osvitaua.png b/recipes/icons/osvitaua.png new file mode 100644 index 0000000000..3f4da96b63 Binary files /dev/null and b/recipes/icons/osvitaua.png differ diff --git a/recipes/icons/osvitaua_ru.png b/recipes/icons/osvitaua_ru.png new file mode 100644 index 0000000000..3f4da96b63 Binary files /dev/null and b/recipes/icons/osvitaua_ru.png differ diff --git a/recipes/icons/ukrinform_de.png b/recipes/icons/ukrinform_de.png index 3b1ccb657a..d23dac533c 100644 Binary files a/recipes/icons/ukrinform_de.png and b/recipes/icons/ukrinform_de.png differ diff --git a/recipes/icons/ukrinform_en.png b/recipes/icons/ukrinform_en.png index 3b1ccb657a..d23dac533c 100644 Binary files a/recipes/icons/ukrinform_en.png and b/recipes/icons/ukrinform_en.png differ diff --git a/recipes/icons/ukrinform_es.png b/recipes/icons/ukrinform_es.png index 3b1ccb657a..d23dac533c 100644 Binary files a/recipes/icons/ukrinform_es.png and b/recipes/icons/ukrinform_es.png differ diff --git a/recipes/icons/ukrinform_fr.png b/recipes/icons/ukrinform_fr.png index 3b1ccb657a..d23dac533c 100644 Binary files a/recipes/icons/ukrinform_fr.png and b/recipes/icons/ukrinform_fr.png differ diff --git a/recipes/icons/ukrinform_ja.png b/recipes/icons/ukrinform_ja.png index 3b1ccb657a..d23dac533c 100644 Binary files a/recipes/icons/ukrinform_ja.png and b/recipes/icons/ukrinform_ja.png differ diff --git a/recipes/icons/ukrinform_pl.png b/recipes/icons/ukrinform_pl.png index 3b1ccb657a..d23dac533c 100644 Binary files a/recipes/icons/ukrinform_pl.png and b/recipes/icons/ukrinform_pl.png differ diff --git a/recipes/icons/ukrinform_ru.png b/recipes/icons/ukrinform_ru.png index 3b1ccb657a..d23dac533c 100644 Binary files a/recipes/icons/ukrinform_ru.png and b/recipes/icons/ukrinform_ru.png differ diff --git a/recipes/icons/ukrinform_uk.png b/recipes/icons/ukrinform_uk.png index 3b1ccb657a..d23dac533c 100644 Binary files a/recipes/icons/ukrinform_uk.png and b/recipes/icons/ukrinform_uk.png differ diff --git a/recipes/icons/unn_ru.png b/recipes/icons/unn_ru.png new file mode 100644 index 0000000000..f937eafa66 Binary files /dev/null and b/recipes/icons/unn_ru.png differ diff --git a/recipes/icons/unn_ua.png b/recipes/icons/unn_ua.png new file mode 100644 index 0000000000..f937eafa66 Binary files /dev/null and b/recipes/icons/unn_ua.png differ diff --git a/recipes/interfax_uk.recipe b/recipes/interfax_uk.recipe index 717c783e73..1f232dbdef 100644 --- a/recipes/interfax_uk.recipe +++ b/recipes/interfax_uk.recipe @@ -11,7 +11,7 @@ class InterfaxUARU(BasicNewsRecipe): publisher = '\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u0435 \u0430\u0433\u0435\u043D\u0442\u0441\u0442\u0432\u043E \u00AB\u0418\u043D\u0442\u0435\u0440\u0444\u0430\u043A\u0441-\u0423\u043A\u0440\u0430\u0438\u043D\u0430\u00BB' # noqa category = 'newspaper' cover_url = u'https://interfax.com.ua/static/articles/images/interfax_ukraine_logo_rus.svg' - language = 'ru_UK' + language = 'ru' no_stylesheets = True remove_javascript = False auto_cleanup = False diff --git a/recipes/liganet_ru.recipe b/recipes/liganet_ru.recipe new file mode 100644 index 0000000000..c2958e09a3 --- /dev/null +++ b/recipes/liganet_ru.recipe @@ -0,0 +1,198 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 + +from calibre.web.feeds.news import BasicNewsRecipe + + +class LigaNet(BasicNewsRecipe): + title = '\u041B\u0406\u0413\u0410.net' + __author__ = 'bugmen00t' + description = '\u0414\u0456\u043B\u043E\u0432\u0438\u0439 \u043D\u043E\u0432\u0438\u043D\u043D\u0438\u0439 \u043F\u043E\u0440\u0442\u0430\u043B' + publisher = 'Ligamedia' + category = 'blog' + cover_url = u'https://www.liga.net/design/images/logo_liga.png' + language = 'ru' + no_stylesheets = False + remove_javascript = False + auto_cleanup = False + oldest_article = 7 + max_articles_per_feed = 30 + + remove_tags_before = dict(name='h1') + + remove_tags_after = dict(name='div', attrs={'id': 'news-text'}) + + remove_tags = [ + dict(name='footer'), + dict(name='div', attrs={'class': 'more-link red'}), + dict(name='div', attrs={'class': 'read-too'}), + dict(name='div', attrs={'class': 'to-send-row'}), + dict(name='div', attrs={'class': 'hint-row'}), + dict(name='div', attrs={'class': 'chronicle-top-eye'}), + dict(name='div', attrs={'class': 'chronicle-top-comm comm-btns'}), + dict(name='div', attrs={'class': 'chronicle-news m-t-30'}), + dict(name='div', attrs={'class': 'right-inner-content'}), + dict(name='div', attrs={'class': 'right-part'}), + dict(name='div', attrs={'class': 'hreflang-link'}), + dict(name='div', attrs={'class': 'vakansii-block-article'}), + dict( + name='div', attrs={'class': 'col-12 col-md p-side-10 sp-card-paddings'} + ), + dict( + name='div', + attrs={'class': 'social-shares d-flex justify-content-center'} + ), + dict(name='div', attrs={'class': 'social-shares d-block'}), + dict(name='div', attrs={'class': 'social-likes clearfix hidden-1280 '}), + dict(name='div', attrs={'class': 'soc-item comm-btns'}), + dict(name='div', attrs={'class': 'soc-buttons'}), + dict( + name='div', + attrs={'class': 'warning m-t-20 d-none d-md-none d-lg-block'} + ), + dict(name='div', attrs={'id': 'news-list-right'}), + dict(name='div', attrs={'id': 'premium_mobile'}), + dict(name='div', attrs={'id': 'premium2_mobile'}), + dict(name='div', attrs={'class': 'marketing-block'}), + dict(name='span', attrs={'class': 'social-likes__button'}), + dict(name='div', attrs={'class': 'marketing-block'}) + ] + + feeds = [ + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0433\u043B\u0430\u0432\u043D\u044B\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B', + 'https://www.liga.net/news/top/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043D\u043E\u0432\u043E\u0441\u0442\u0438', + 'https://www.liga.net/news/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0441\u0442\u0430\u0442\u044C\u0438', + 'https://www.liga.net/news/articles/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0438\u043D\u0442\u0435\u0440\u0432\u044C\u044E', + 'https://www.liga.net/news/interview/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043C\u043D\u0435\u043D\u0438\u044F', + 'https://www.liga.net/news/opinion/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0444\u043E\u0442\u043E\u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B', + 'https://www.liga.net/news/photo/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043F\u043E\u043B\u0438\u0442\u0438\u043A\u0430', + 'https://www.liga.net/news/politics/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u044D\u043A\u043E\u043D\u043E\u043C\u0438\u043A\u0430', + 'https://www.liga.net/news/economics/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043E\u0431\u0449\u0435\u0441\u0442\u0432\u043E', + 'https://www.liga.net/news/society/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043C\u0438\u0440', + 'https://www.liga.net/news/world/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0441\u0442\u043E\u043B\u0438\u0446\u0430', + 'https://www.liga.net/news/capital/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0441\u043F\u043E\u0440\u0442', + 'https://www.liga.net/news/sport/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u0435', + 'https://www.liga.net/news/health/rss.xml' + ), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438: \u043A\u0443\u043B\u044C\u0442\u0443\u0440\u0430', + 'https://www.liga.net/news/culture/rss.xml' + ), + ( + '\u0412\u0441\u0435 \u043C\u043D\u0435\u043D\u0438\u044F', + 'https://www.liga.net/opinion/rss.xml' + ), + ( + '\u0411\u0438\u0437\u043D\u0435\u0441: \u0433\u043B\u0430\u0432\u043D\u044B\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B', + 'https://www.liga.net/biz/top/rss.xml' + ), + ( + '\u0411\u0438\u0437\u043D\u0435\u0441: \u043D\u043E\u0432\u043E\u0441\u0442\u0438', + 'https://www.liga.net/biz/news/rss.xml' + ), + ( + '\u0411\u0438\u0437\u043D\u0435\u0441: \u0441\u0442\u0430\u0442\u044C\u0438', + 'https://www.liga.net/biz/articles/rss.xml' + ), + ( + '\u0411\u0438\u0437\u043D\u0435\u0441: \u0438\u043D\u0442\u0435\u0440\u0432\u044C\u044E', + 'https://www.liga.net/biz/interview/rss.xml' + ), + ( + '\u0411\u0438\u0437\u043D\u0435\u0441: \u043C\u043D\u0435\u043D\u0438\u044F', + 'https://www.liga.net/biz/opinion/rss.xml' + ), + ( + '\u0411\u0438\u0437\u043D\u0435\u0441: \u0444\u043E\u0442\u043E\u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B', + 'https://www.liga.net/biz/photo/rss.xml' + ), + ( + '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u0433\u043B\u0430\u0432\u043D\u044B\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B', + 'https://www.liga.net/fin/export/top.xml' + ), + ( + '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u043C\u043D\u0435\u043D\u0438\u044F', + 'https://www.liga.net/fin/opinion/rss.xml' + ), + ( + '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u0431\u0430\u043D\u043A\u0438', + 'https://www.liga.net/fin/export/bank.xml' + ), + ( + '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435', + 'https://www.liga.net/fin/export/insurance.xml' + ), + ( + '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u043A\u0440\u0438\u043F\u0442\u043E\u044D\u043A\u043E\u043D\u043E\u043C\u0438\u043A\u0430', + 'https://www.liga.net/fin/crypto/rss.xml' + ), + ( + '\u0424\u0438\u043D\u0430\u043D\u0441\u044B: \u0444\u043E\u043D\u0434\u044B', + 'https://www.liga.net/fin/export/funds.xml' + ), + ( + 'Tech: \u0433\u043B\u0430\u0432\u043D\u044B\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B', + 'https://www.liga.net/tech/top/rss.xml' + ), + ( + 'Tech: \u0442\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0438\u0438', + 'https://www.liga.net/tech/technology/rss.xml' + ), + ( + 'Tech: \u0442\u0435\u043B\u0435\u043A\u043E\u043C', + 'https://www.liga.net/tech/telecom/rss.xml' + ), + ( + 'Tech: \u0433\u0430\u0434\u0436\u0435\u0442\u044B', + 'https://www.liga.net/tech/gadgets/rss.xml' + ), + ( + 'Tech: \u0441\u0432\u043E\u0439 \u0431\u0438\u0437\u043D\u0435\u0441', + 'https://www.liga.net/tech/own-business/rss.xml' + ), + ( + 'Tech: \u0431\u0430\u0442\u0442\u043B\u044B', + 'https://www.liga.net/tech/battles/rss.xml' + ), + ( + '\u0411\u043B\u043E\u0433\u0438: \u0432\u0441\u0435 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B', + 'https://www.liga.net/rss/blog.xml' + ) + ] diff --git a/recipes/liganet_ua.recipe b/recipes/liganet_ua.recipe new file mode 100644 index 0000000000..eca92feacb --- /dev/null +++ b/recipes/liganet_ua.recipe @@ -0,0 +1,70 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 + +from calibre.web.feeds.news import BasicNewsRecipe + + +class LigaNet(BasicNewsRecipe): + title = '\u041B\u0406\u0413\u0410.net (UA)' + __author__ = 'bugmen00t' + description = '\u0414\u0456\u043B\u043E\u0432\u0438\u0439 \u043D\u043E\u0432\u0438\u043D\u043D\u0438\u0439 \u043F\u043E\u0440\u0442\u0430\u043B' + publisher = 'Ligamedia' + category = 'blog' + cover_url = u'https://www.liga.net/design/images/logo_liga.png' + language = 'uk' + no_stylesheets = False + remove_javascript = False + auto_cleanup = False + oldest_article = 7 + max_articles_per_feed = 30 + + remove_tags_before = dict(name='h1') + + remove_tags_after = dict(name='div', attrs={'id': 'news-text'}) + + remove_tags = [ + dict(name='footer'), + dict(name='div', attrs={'class': 'more-link red'}), + dict(name='div', attrs={'class': 'read-too'}), + dict(name='div', attrs={'class': 'to-send-row'}), + dict(name='div', attrs={'class': 'hint-row'}), + dict(name='div', attrs={'class': 'chronicle-top-eye'}), + dict(name='div', attrs={'class': 'chronicle-top-comm comm-btns'}), + dict(name='div', attrs={'class': 'chronicle-news m-t-30'}), + dict(name='div', attrs={'class': 'right-inner-content'}), + dict(name='div', attrs={'class': 'right-part'}), + dict(name='div', attrs={'class': 'hreflang-link'}), + dict(name='div', attrs={'class': 'vakansii-block-article'}), + dict( + name='div', attrs={'class': 'col-12 col-md p-side-10 sp-card-paddings'} + ), + dict( + name='div', + attrs={'class': 'social-shares d-flex justify-content-center'} + ), + dict(name='div', attrs={'class': 'social-shares d-block'}), + dict(name='div', attrs={'class': 'social-likes clearfix hidden-1280 '}), + dict(name='div', attrs={'class': 'soc-item comm-btns'}), + dict(name='div', attrs={'class': 'soc-buttons'}), + dict( + name='div', + attrs={'class': 'warning m-t-20 d-none d-md-none d-lg-block'} + ), + dict(name='div', attrs={'id': 'news-list-right'}), + dict(name='div', attrs={'id': 'premium_mobile'}), + dict(name='div', attrs={'id': 'premium2_mobile'}), + dict(name='div', attrs={'class': 'marketing-block'}), + dict(name='span', attrs={'class': 'social-likes__button'}), + dict(name='div', attrs={'class': 'marketing-block'}) + ] + + feeds = [ + ( + '\u041D\u043E\u0432\u0438\u043D\u0438: \u0433\u043E\u043B\u043E\u0432\u043D\u0456 \u043C\u0430\u0442\u0435\u0440\u0456\u0430\u043B\u0438', + 'https://www.liga.net/newsua/top/rss.xml' + ), + ( + '\u041D\u043E\u0432\u0438\u043D\u0438: \u0432\u0441\u0456 \u043C\u0430\u0442\u0435\u0440\u0456\u0430\u043B\u0438', + 'https://www.liga.net/newsua/all/rss.xml' + ) + ] diff --git a/recipes/osvitaua.recipe b/recipes/osvitaua.recipe new file mode 100644 index 0000000000..540895f5b4 --- /dev/null +++ b/recipes/osvitaua.recipe @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 + +from calibre.web.feeds.news import BasicNewsRecipe + + +class Osvita(BasicNewsRecipe): + title = '\u041E\u0441\u0432\u0456\u0442\u0430.ua' + __author__ = 'bugmen00t' + 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 + publisher = '\u041E\u0441\u0432\u0456\u0442\u0430.ua' + category = 'blog' + cover_url = u'http://osvita.ua/doc/i/Contacts-logo.jpg' + language = 'uk' + no_stylesheets = False + remove_javascript = False + auto_cleanup = False + oldest_article = 7 + max_articles_per_feed = 30 + + remove_tags_before = dict(name='div', attrs={'id': 'body'}) + + remove_tags_after = dict(name='div', attrs={'id': 'body'}) + + remove_tags = [ + # Unable to fetch images, removing them completely + dict(name='img'), + dict(name='p', attrs={'class': 'info'}) + ] + + feeds = [('\u041D\u043E\u0432\u0438\u043D\u0438', 'https://osvita.ua/rss/')] + + def print_version(self, url): + return url + 'print' diff --git a/recipes/osvitaua_ru.recipe b/recipes/osvitaua_ru.recipe new file mode 100644 index 0000000000..da8aa9e454 --- /dev/null +++ b/recipes/osvitaua_ru.recipe @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 + +from calibre.web.feeds.news import BasicNewsRecipe + + +class Osvita(BasicNewsRecipe): + title = '\u041E\u0441\u0432\u0456\u0442\u0430.ua' + __author__ = 'bugmen00t' + description = '\u0422\u0435\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441, \u043F\u043E\u0441\u0432\u044F\u0449\u0451\u043D\u043D\u044B\u0439 \u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u043D\u0438\u044E \u0432 \u0423\u043A\u0440\u0430\u0438\u043D\u0435 \u0438 \u0437\u0430 \u0440\u0443\u0431\u0435\u0436\u043E\u043C.' # noqa + publisher = '\u041E\u0441\u0432\u0456\u0442\u0430.ua' + category = 'blog' + cover_url = u'http://osvita.ua/doc/i/Contacts-logo.jpg' + language = 'ru' + no_stylesheets = False + remove_javascript = False + auto_cleanup = False + oldest_article = 7 + max_articles_per_feed = 30 + + remove_tags_before = dict(name='div', attrs={'id': 'body'}) + + remove_tags_after = dict(name='div', attrs={'id': 'body'}) + + remove_tags = [ + # Unable to fetch images, removing them completely + dict(name='img'), + dict(name='p', attrs={'class': 'info'}) + ] + + feeds = [('\u041D\u043E\u0432\u0438\u043D\u0438', 'https://ru.osvita.ua/rss/')] + + def print_version(self, url): + return url + 'print' diff --git a/recipes/unn_ru.recipe b/recipes/unn_ru.recipe new file mode 100644 index 0000000000..dd02207f3d --- /dev/null +++ b/recipes/unn_ru.recipe @@ -0,0 +1,104 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 + +from calibre.web.feeds.news import BasicNewsRecipe + + +class UNN(BasicNewsRecipe): + title = '\u0423\u043A\u0440\u0430\u0438\u043D\u0441\u043A\u0438\u0435 \u041D\u0430\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0435 \u041D\u043E\u0432\u043E\u0441\u0442\u0438' # noqa + __author__ = 'bugmen00t' + description = '\u0423\u041D\u041D: \u0423\u043A\u0440\u0430\u0438\u043D\u0441\u043A\u0438\u0435 \u041D\u0430\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0435 \u041D\u043E\u0432\u043E\u0441\u0442\u0438' # noqa + publisher = '\u0406\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0456\u0439\u043D\u0435 \u0430\u0433\u0435\u043D\u0442\u0441\u0442\u0432\u043E \u00AB\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0456 \u041D\u0430\u0446\u0456\u043E\u043D\u0430\u043B\u044C\u043D\u0456 \u041D\u043E\u0432\u0438\u043D\u0438\u00BB' # noqa + category = 'newspaper' + cover_url = u'https://argentum.ua/uploads/portfolio/2012/c043e0e18fd9f89df5fb421ab28cf609197011c2.png' + language = 'ru' + no_stylesheets = False + remove_javascript = False + auto_cleanup = False + oldest_article = 7 + max_articles_per_feed = 50 + + remove_tags_before = dict(name='span', attrs={'itemprop': 'datePublished'}) + + remove_tags_after = dict(name='div', attrs={'class': 'b-news-full'}) + + remove_tags = [ + dict(name='span', attrs={'class': 'view'}), + dict(name='div', attrs={'class': 'b-news-tags'}), + dict(name='div', attrs={'class': 'b-news-source'}), + dict(name='div', attrs={'class': 'b-news-footer'}), + dict(name='div', attrs={'class': 'b-notice-msg'}) + ] + + feeds = [ + ( + '\u041E\u043F\u0435\u0440\u0430\u0442\u0438\u0432\u043D\u044B\u0435 \u043D\u043E\u0432\u043E\u0441\u0442\u0438', + 'https://www.unn.com.ua/rss/news_ru.xml' + ), + ( + '\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438', + 'https://www.unn.com.ua/rss/publication_ru.xml' + ), + ( + '\u042D\u043A\u0441\u043A\u043B\u044E\u0437\u0438\u0432\u043D\u044B\u0435 \u043D\u043E\u0432\u043E\u0441\u0442\u0438', + 'https://www.unn.com.ua/rss/exclusive_ru.xml' + ), + ( + '\u041F\u043E\u043B\u0438\u0442\u0438\u043A\u0430', + 'https://www.unn.com.ua/rss/news_politics_ru.xml' + ), + ( + '\u042D\u043A\u043E\u043D\u043E\u043C\u0438\u043A\u0430', + 'https://www.unn.com.ua/rss/news_economics_ru.xml' + ), + ( + '\u0410\u0433\u0440\u043E\u043D\u043E\u0432\u043E\u0441\u0442\u0438', + 'https://www.unn.com.ua/rss/news_agronews_ru.xml' + ), + ( + '\u041E\u0434\u0435\u0441\u0441\u0430', + 'https://www.unn.com.ua/rss/news_odesa_ru.xml' + ), + ('\u041A\u0438\u0435\u0432', 'https://www.unn.com.ua/rss/news_kiev_ru.xml'), + ('COVID-19', 'https://www.unn.com.ua/rss/news_covid19_ru.xml'), + ( + '\u041E\u0431\u0449\u0435\u0441\u0442\u0432\u043E', + 'https://www.unn.com.ua/rss/news_society_ru.xml' + ), + ( + '\u0417\u0434\u043E\u0440\u043E\u0432\u044C\u0435', + 'https://www.unn.com.ua/rss/news_health_ru.xml' + ), + ( + '\u0412\u043E\u0439\u043D\u0430', + 'https://www.unn.com.ua/rss/news_war_ru.xml' + ), + ( + '\u041A\u0440\u0438\u043C\u0438\u043D\u0430\u043B \u0438 \u0427\u041F', + 'https://www.unn.com.ua/rss/news_criminal_ru.xml' + ), + ('\u0423\u041D\u041D Lite', 'https://www.unn.com.ua/rss/news_lite_ru.xml'), + ( + '\u041D\u043E\u0432\u043E\u0441\u0442\u0438 \u041C\u0438\u0440\u0430', + 'https://www.unn.com.ua/rss/news_world_ru.xml' + ), + ( + '\u0422\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0438\u0438', + 'https://www.unn.com.ua/rss/news_tech_ru.xml' + ), + ( + '\u0421\u043F\u043E\u0440\u0442', + 'https://www.unn.com.ua/rss/news_sport_ru.xml' + ), + ( + '\u041A\u0443\u043B\u044C\u0442\u0443\u0440\u0430', + 'https://www.unn.com.ua/rss/news_culture_ru.xml' + ), + ( + '\u041C\u0443\u043B\u044C\u0442\u0438\u043C\u0435\u0434\u0438\u0430', + 'https://www.unn.com.ua/rss/news_media_ru.xml' + ) + ] + + def print_version(self, url): + return url + '?_part=main&_print=1' diff --git a/recipes/unn_ua.recipe b/recipes/unn_ua.recipe new file mode 100644 index 0000000000..749712f479 --- /dev/null +++ b/recipes/unn_ua.recipe @@ -0,0 +1,104 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 + +from calibre.web.feeds.news import BasicNewsRecipe + + +class UNN(BasicNewsRecipe): + title = '\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0456 \u041D\u0430\u0446\u0456\u043E\u043D\u0430\u043B\u044C\u043D\u0456 \u041D\u043E\u0432\u0438\u043D\u0438' # noqa + __author__ = 'bugmen00t' + description = '\u0423\u041D\u041D: \u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0456 \u041D\u0430\u0446\u0456\u043E\u043D\u0430\u043B\u044C\u043D\u0456 \u041D\u043E\u0432\u0438\u043D\u0438' # noqa + publisher = '\u0406\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0456\u0439\u043D\u0435 \u0430\u0433\u0435\u043D\u0442\u0441\u0442\u0432\u043E \u00AB\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0456 \u041D\u0430\u0446\u0456\u043E\u043D\u0430\u043B\u044C\u043D\u0456 \u041D\u043E\u0432\u0438\u043D\u0438\u00BB' # noqa + category = 'newspaper' + cover_url = u'https://pechersk.kyivcity.gov.ua/done_img/b/11289.jpg' + language = 'uk' + no_stylesheets = False + remove_javascript = False + auto_cleanup = False + oldest_article = 7 + max_articles_per_feed = 50 + + remove_tags_before = dict(name='span', attrs={'itemprop': 'datePublished'}) + + remove_tags_after = dict(name='div', attrs={'class': 'b-news-full'}) + + remove_tags = [ + dict(name='span', attrs={'class': 'view'}), + dict(name='div', attrs={'class': 'b-news-tags'}), + dict(name='div', attrs={'class': 'b-news-source'}), + dict(name='div', attrs={'class': 'b-news-footer'}), + dict(name='div', attrs={'class': 'b-notice-msg'}) + ] + + feeds = [ + ( + '\u041E\u043F\u0435\u0440\u0430\u0442\u0438\u0432\u043D\u0456 \u043D\u043E\u0432\u0438\u043D\u0438', + 'https://www.unn.com.ua/rss/news_uk.xml' + ), + ( + '\u041F\u0443\u0431\u043B\u0456\u043A\u0430\u0446\u0456\u0457', + 'https://www.unn.com.ua/rss/publication_uk.xml' + ), + ( + '\u0415\u043A\u0441\u043A\u043B\u044E\u0437\u0438\u0432\u043D\u0456 \u043D\u043E\u0432\u0438\u043D\u0438', + 'https://www.unn.com.ua/rss/exclusive_uk.xml' + ), + ( + '\u041F\u043E\u043B\u0456\u0442\u0438\u043A\u0430', + 'https://www.unn.com.ua/rss/news_politics_uk.xml' + ), + ( + '\u0415\u043A\u043E\u043D\u043E\u043C\u0456\u043A\u0430', + 'https://www.unn.com.ua/rss/news_economics_uk.xml' + ), + ( + '\u0410\u0433\u0440\u043E\u043D\u043E\u0432\u0438\u043D\u0438', + 'https://www.unn.com.ua/rss/news_agronews_uk.xml' + ), + ( + '\u041E\u0434\u0435\u0441\u0430', + 'https://www.unn.com.ua/rss/news_odesa_uk.xml' + ), + ('\u041A\u0438\u0457\u0432', 'https://www.unn.com.ua/rss/news_kiev_uk.xml'), + ('COVID-19', 'https://www.unn.com.ua/rss/news_covid19_uk.xml'), + ( + '\u0421\u0443\u0441\u043F\u0456\u043B\u044C\u0441\u0442\u0432\u043E', + 'https://www.unn.com.ua/rss/news_society_uk.xml' + ), + ( + '\u0417\u0434\u043E\u0440\u043E\u0432\u0027\u044F', + 'https://www.unn.com.ua/rss/news_health_uk.xml' + ), + ( + '\u0412\u0456\u0439\u043D\u0430', + 'https://www.unn.com.ua/rss/news_war_uk.xml' + ), + ( + '\u041A\u0440\u0438\u043C\u0456\u043D\u0430\u043B \u0442\u0430 \u041D\u041F', + 'https://www.unn.com.ua/rss/news_criminal_uk.xml' + ), + ('\u0423\u041D\u041D Lite', 'https://www.unn.com.ua/rss/news_lite_uk.xml'), + ( + '\u041D\u043E\u0432\u0438\u043D\u0438 \u0421\u0432\u0456\u0442\u0443', + 'https://www.unn.com.ua/rss/news_world_uk.xml' + ), + ( + '\u0422\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0456\u0457', + 'https://www.unn.com.ua/rss/news_tech_uk.xml' + ), + ( + '\u0421\u043F\u043E\u0440\u0442', + 'https://www.unn.com.ua/rss/news_sport_uk.xml' + ), + ( + '\u041A\u0443\u043B\u044C\u0442\u0443\u0440\u0430', + 'https://www.unn.com.ua/rss/news_culture_uk.xml' + ), + ( + '\u041C\u0443\u043B\u044C\u0442\u0438\u043C\u0435\u0434\u0456\u0430', + 'https://www.unn.com.ua/rss/news_media_uk.xml' + ) + ] + + def print_version(self, url): + return url + '?_part=main&_print=1'