__license__ = 'GPL v3'
__copyright__ = 'Jelle van der Waa <jelle@vdwaa.nl>'

from calibre.web.feeds.news import BasicNewsRecipe


class KrebsOnSecurity(BasicNewsRecipe):

    title = u'Krebs on Security'
    publisher = u'Brian Krebs'
    __author__ = 'Jelle van der Waa'
    description = 'In-depth Security news and investigation'
    category = 'security, news'
    cover_url = 'http://krebsonsecurity.com/wp-content/themes/krebsads/krebsads/images/header.jpg'
    oldest_article = 7
    max_articles_per_feed = 100
    remove_javascript = True
    no_stylesheets = True
    use_embedded_content = False
    language = 'en'
    remove_empty_feeds = True
    keep_only_tags = [dict(name='h2', attrs={'class': 'post-title'}),
                      dict(name='div', attrs={'class': ['entry']})]
    remove_tags = [dict(name='p', attrs={'class': ['small',
                                                   'mid-banner',
                                                   'metadata alt',
                                                   'postmetadata alt',
                                                   'insider_continue']}),
                   dict(attrs={'alt': ['pinterest', 'facebook', 'twitter', 'reddit', 'mail', 'linkedin', 'google_plus']})]
    feeds = [(u'Krebs on security', u'http://feeds.feedburner.com/KrebsOnSecurity')]
