#!/usr/bin/env python

__license__ = 'GPL v3'
from calibre.web.feeds.news import BasicNewsRecipe


class ppeRecipe(BasicNewsRecipe):
    __author__ = 'Artur Stachecki <artur.stachecki@gmail.com>'
    language = 'pl'
    title = 'ppe.pl'
    category = 'News'
    description = 'Portal o konsolach i grach wideo.'
    extra_css = '.categories > li {list-style: none; display: inline;} .galmini > li {list-style: none; float: left;} .calibre_navbar {clear: both;}'
    no_stylesheets = True
    oldest_article = 7
    max_articles_per_feed = 100
    remove_javascript = True
    remove_empty_feeds = True
    remove_attributes = ['style']

    keep_only_tags = [dict(attrs={'class': 'box'})]
    remove_tags = [dict(attrs={'class': ['voltage-1', 'voltage-2', 'encyklopedia', 'nag', 'related', 'comment_form', 'komentarze-box']})]

    feeds = [
        ('Newsy', 'http://ppe.pl/rss.html'),
        ('Recenzje', 'http://ppe.pl/rss-recenzje.html'),
        ('Publicystyka', 'http://ppe.pl/rss-publicystyka.html'),
    ]
