#!/usr/bin/env python

__license__ = 'GPL v3'
__copyright__ = '2014, Brandon S Allbery <allbery.b at gmail.com>'
'''
Dark Reading:  protect the business.  enable access.
'''

from calibre.web.feeds.news import BasicNewsRecipe


class DarkReading(BasicNewsRecipe):
    title = u'Dark Reading'
    __author__ = 'Brandon Allberry'
    language = 'en'
    description = u'Dark Reading is the premier online resource helping information security professionals manage the balance between protection and access. It offers breaking news and analysis on attacks, breaches and vulnerabilities, as well as strategies for protecting enterprise data. It also offers guidance on setting risk management and compliance policies.'  # noqa
    oldest_article = 7
    max_articles_per_feed = 100
    keep_only_tags = [dict(id=['article-main', 'header-full'])]
    masthead_url = u'http://img.deusm.com/darkreading/DR-logo.png'
    cover_url = u'http://img.deusm.com/darkreading/DR-logo.png'
    remove_tags = [
        dict(name='div', attrs={'id': 'first-level-nav-container'}),
        dict(name='div', attrs={'id': 'search-box'}),
        dict(name='div', attrs={'id': 'mobile-menu-nav'}),
        dict(name='div', attrs={'id': 'mobile-menu-profile'}),
        dict(name='div', attrs={'id': 'mobile-menu-search'}),
        dict(name='div', attrs={'id': 'mobile-menu-rss'}),
        dict(name='div', attrs={'id': 'second-level'}),
        dict(name='div', attrs={'id': 'third-level'}),
        dict(name='div', attrs={'id': 'aside-main'}),
        dict(name='div', attrs={'id': 'third-level'}),
        dict(name='div', attrs={'id': 'more-insights'}),
        dict(name='div', attrs={'class': 'more-insights-item'})
                   ]
    feeds = [(u'All', u'http://www.darkreading.com/rss_simple.asp')]
