﻿#!/usr/bin/env python
# vim:fileencoding=utf-8

from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe

class TheBell(BasicNewsRecipe):
    title          	  = 'The Bell'
    __author__            = 'bugmen00t'
    description           = '\u0418\u043D\u0442\u0435\u0440\u043D\u0435\u0442-\u0438\u0437\u0434\u0430\u043D\u0438\u0435 \u0438 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 \u0431\u044E\u043B\u043B\u0435\u0442\u0435\u043D\u044C, \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u0438\u0437\u0438\u0440\u0443\u044E\u0449\u0435\u0435\u0441\u044F \u043D\u0430 \u0431\u0438\u0437\u043D\u0435\u0441-\u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445.'
    publisher             = '\u0415\u043B\u0438\u0437\u0430\u0432\u0435\u0442\u0430 \u041E\u0441\u0435\u0442\u0438\u043D\u0441\u043A\u0430\u044F, \u0418\u0440\u0438\u043D\u0430 \u041C\u0430\u043B\u043A\u043E\u0432\u0430'
    category              = 'newspaper'
    cover_url = u'https://thebell.io/wp-content/uploads/2018/03/thebell-cover.png'
    language              = 'ru'
    no_stylesheets        = True
    remove_javascript = False
    auto_cleanup   = False
    oldest_article = 7
    max_articles_per_feed = 20

    remove_tags_before = dict(name='h1')

    remove_tags_after = dict(name='div', attrs={'class': 'post'})

    remove_tags =   [
        dict(name='div', attrs={'class': 'post_bottom ng-tns-c84-1 ng-star-inserted'}),
        dict(name='div', attrs={'class': 'post_tags ng-tns-c84-1 ng-star-inserted'}),
        dict(name='div', attrs={'class': 'post_subscribe ng-tns-c84-1 ng-star-inserted'}),
        dict(name='div', attrs={'class': 'author__content_image author__content_image_small ng-star-inserted'}),
        dict(name='div', attrs={'class': 'email email_small ng-star-inserted'}),
        dict(name='div', attrs={'class': 'post_share ng-tns-c84-1'}),
        dict(name='div', attrs={'class': 'social_media'})
        ] 

    feeds = [
        ('The Bell', 'https://thebell.io/feed')
        ]