#!/usr/bin/env  python

__license__   = 'GPL v3'
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
'''
dn.se
'''
from calibre.web.feeds.news import BasicNewsRecipe

class DN_se(BasicNewsRecipe):
    title                 = 'Dagens Nyheter'
    __author__            = 'Darko Miletic'
    description           = 'News from Sweden'
    publisher             = 'Dagens Nyheter'
    category              = 'news, politics, Sveden'
    oldest_article        = 2
    delay                 = 1
    max_articles_per_feed = 100
    no_stylesheets        = True
    use_embedded_content  = False
    encoding              = 'utf-8'
    language              = 'sv'

    conversion_options = {
                          'comment'   : description
                        , 'tags'      : category
                        , 'publisher' : publisher
                        , 'language'  : language
                        }

    feeds = [
               (u'Nyheter', u'http://www.dn.se/m/rss/toppnyheter')
              ,(u'Ekonomi', u'http://www.dn.se/ekonomi-rss'      )
              ,(u'Sport'  , u'http://www.dn.se/sport-rss'        )
              ,(u'Debatt' , u'http://www.dn.se/debatt-rss'       )
              ,(u'Ledare' , u'http://www.dn.se/ledare-rss'       )
              ,(u'Kultur' , u'http://www.dn.se/kultur-rss'       )
            ]

    keep_only_tags = [dict(name='div', attrs={'id':'article'})]
    remove_tags_before = dict(name='h1')
    remove_tags_after = dict(name='div',attrs={'id':'byline'})
    remove_tags = [
                     dict(name=['object','link','base'])
                    ,dict(name='div',attrs={'id':'hook'})
                  ]

    
    
