from calibre.web.feeds.news import BasicNewsRecipe


class Aftenposten(BasicNewsRecipe):
    title = u'Aftenposten'
    __author__ = 'davotibarna'
    description = 'Norske nyheter'
    language = 'no'
    oldest_article = 5
    max_articles_per_feed = 100
    recipe_disabled = ('The recipe to download Aftenposten has been '
                       'temporarily disabled at the publisher\'s request, while '
                       'they finalize their digital strategy.')
    no_stylesheets = True
    encoding = 'ISO-8859-1'

    feeds = [(u'Aftenposten', u'http://www.aftenposten.no/eksport/rss-1_0/')]

    def print_version(self, url):
        return url.replace('#xtor=RSS-3', '?service=print')
