#!/usr/bin/env python
# vim:fileencoding=utf-8

from calibre.web.feeds.news import BasicNewsRecipe


class Zerkalo(BasicNewsRecipe):
    title = '\u0417\u0435\u0440\u043a\u0430\u043b\u043e'
    description = '\u0417\u0435\u0440\u043a\u0430\u043b\u043e, \u043f\u0440\u043e\u0435\u043a\u0442 \u0447\u0430\u0441\u0442\u0438 \u0431\u044b\u0432\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b TUT.BY.'  # noqa: E501
    __author__ = 'bugmen00t'
    publisher = '\u0417\u0435\u0440\u043a\u0430\u043b\u043e (zerkalo.io)'
    publication_type = 'news'
    oldest_article = 7
    max_articles_per_feed = 100
    language = 'ru_BE'
    cover_url = 'https://upload.wikimedia.org/wikipedia/commons/c/c7/Zerkalo.io.png'
    auto_cleanup = False
    no_stylesheets = False

    remove_tags_before = dict(name='h1')

    remove_tags_after = dict(name='div', attrs={'id': 'article_body'})

    remove_tags = [
        dict(name='div', attrs={'class': 'b-addition m-single m-simplify'}),
        dict(name='div', attrs={'class': 'b-addition m-simplify'}),
        dict(name='iframe'),
    ]

    feeds = [
        # Original feeds
        # ('\u041D\u043E\u0432\u043E\u0441\u0442\u0438 \u0437\u0430 \u0434\u0435\u043D\u044C', 'https://news.zerkalo.io/rss/all.rss'),
        # ('\u041D\u043E\u0432\u043E\u0441\u0442\u0438 \u043D\u0435\u0434\u0435\u043B\u0438', 'https://news.zerkalo.io/rss/index.rss'),
        # Censorship bypass
        ('\u041d\u043e\u0432\u043e\u0441\u0442\u0438 \u0437\u0430 \u0434\u0435\u043d\u044c', 'https://br0wse-zerkalo.site/news/rss/all.rss'),
        ('\u041d\u043e\u0432\u043e\u0441\u0442\u0438 \u043d\u0435\u0434\u0435\u043b\u0438', 'https://br0wse-zerkalo.site/news/rss/index.rss'),
    ]
