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

__license__ = 'GPL v3'
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
'''
www.ria.ru
'''

from calibre.web.feeds.news import BasicNewsRecipe


class RIANovosti(BasicNewsRecipe):
    title = 'RIA Novosti - Russian'
    __author__ = 'Darko Miletic (with fixes by bugmen00t)'
    description = 'News from Russia'
    publisher = '\u041c\u0418\u0410 \u00ab\u0420\u043e\u0441\u0441\u0438\u044f \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u00bb\u2028 (MIA Russia Today)'
    category = 'news, politics, Russia'
    oldest_article = 7
    max_articles_per_feed = 100
    no_stylesheets = True
    use_embedded_content = False
    encoding = 'utf8'
    language = 'ru'
    publication_type = 'newsportal'
    cover_url = 'https://oldimg.ria.ru/i/ria_social.png'

    remove_tags_before = dict(name='div', attrs={'class': 'article__header'})

    remove_tags_after = dict(name='div', attrs={'class': 'article__userbar'})

    remove_tags = [
        dict(name='div', attrs={'class': 'article__userbar'}),
        dict(name='div', attrs={'class': 'article__title'}),
        dict(name='div', attrs={'class': 'article__aggr'}),
        dict(name='div', attrs={'class': 'article__article-info'}),
    ]

    feeds = [('\u041b\u0435\u043d\u0442\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439', 'https://ria.ru/export/rss2/archive/index.xml')]
