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

from __future__ import absolute_import, division, print_function, unicode_literals

from calibre.web.feeds.news import BasicNewsRecipe

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


class Pravda_ru(BasicNewsRecipe):
    title = u'\u041F\u0440\u0430\u0432\u0434\u0430'
    __author__ = 'Darko Miletic (with fixes by bugmen00t)'
    description = 'Правда.Ру: Аналитика и новости'
    publisher = 'PRAVDA.Ru'
    category = 'news, politics, Russia'
    language = 'ru'
    publication_type = 'newspaper'
    cover_url = 'http://www.pravda.ru/pix/logo.gif'
    oldest_article = 7
    max_articles_per_feed = 50
    auto_cleanup = True

    remove_tags_before = dict(
        name='div', attrs={'class': 'full article full-article'}
    )

    remove_tags_after = dict(name='div', attrs={'class': 'authors-block'})

    remove_tags = [dict(name='div', attrs={'class': 'breadcumbs'})]

    feeds = [(
        u'\u041F\u0440\u0430\u0432\u0434\u0430.RU',
        'https://www.pravda.ru/export.xml'
    ),
             (
                 u'\u0421\u0442\u0430\u0442\u044C\u0438',
                 'https://www.pravda.ru/export-articles.xml'
             ),
             (
                 u'\u041D\u043E\u0432\u043E\u0441\u0442\u0438',
                 'https://www.pravda.ru/export-news.xml'
             )]
