from calibre.web.feeds.recipes import BasicNewsRecipe


class TheRegister(BasicNewsRecipe):
    title = 'The Register'
    __author__ = 'vgrama'
    language = 'en'

    oldest_article = 1
    max_articles_per_feed = 100
    use_embedded_content = False

    feeds = [('Register', 'http://www.theregister.co.uk/headlines.atom')]

    remove_tags = [dict(name='div', attrs={'id': 'leader'}), dict(name='div', attrs={'id': 'footer'}), dict(name='div', attrs={'id': 'masthead'})]

    def print_version(self, url):
        return '%s/print.html' % url
