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

from calibre.web.feeds.news import BasicNewsRecipe

class Zerkalo(BasicNewsRecipe):
    title = u'\u0417\u0435\u0440\u043A\u0430\u043B\u043E'
    description = u'\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.'
    __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_BY'
    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'),
    ]