from calibre.web.feeds.news import BasicNewsRecipe
import re


class BadaniaNet(BasicNewsRecipe):
    title = u'badania.net'
    __author__ = 'fenuks'
    description = u'chcesz wiedzieć więcej?'
    category = 'science'
    language = 'pl'
    cover_url = 'http://badania.net/wp-content/badanianet_green_transparent.png'
    extra_css = '.alignleft {float:left; margin-right:5px;} .alignright {float:right; margin-left:5px;}'
    oldest_article = 7
    max_articles_per_feed = 100
    no_stylesheets = True
    preprocess_regexps = [
        (re.compile(r"<h4>Tekst sponsoruje</h4>", re.IGNORECASE), lambda m: ''), ]
    remove_empty_feeds = True
    use_embedded_content = False
    remove_tags = []
    keep_only_tags = [dict(name='article')]
    feeds = [
    (u'Psychologia', u'http://badania.net/category/psychologia/feed/'),
    (u'Technologie', u'http://badania.net/category/technologie/feed/'),
    (u'Biologia', u'http://badania.net/category/biologia/feed/'),

    (u'Chemia', u'http://badania.net/category/chemia/feed/'),
    (u'Zdrowie', u'http://badania.net/category/zdrowie/'),
    (u'Seks', u'http://badania.net/category/psychologia-ewolucyjna-tematyka-seks/feed/')]
