
from calibre.web.feeds.news import BasicNewsRecipe


class KrytykaPolitycznaRecipe(BasicNewsRecipe):
    __author__ = u'Artur Stachecki <artur.stachecki@gmail.com>'
    language = 'pl'
    version = 1

    title = u'Krytyka Polityczna'
    category = u'News'
    description = u' Lewicowe pismo zaangażowane w bieg spraw publicznych w Polsce.'
    cover_url = ''
    masthead_url = 'https://krytykapolityczna.pl/file/2015/09/krytyka-logo.png'
    remove_empty_feeds = True
    no_stylesheets = True
    oldest_article = 7
    max_articles_per_feed = 50
    recursions = 0

    simultaneous_downloads = 3

    keep_only_tags = [(dict(name='h1')),
       (dict(name='div', attrs={'class': ['entry-meta','post-preview','entry-details', 'entry-content']}))]

    remove_tags = [(dict(attrs={'class': ['_ning_zone_inner','book-item site-commerc','wp-embedded-content',
                    'read-also','meta-date-modified updated', 'textwidget']}))]

    feeds = [('Wszystkie', 'https://www.krytykapolityczna.pl/rss')]
