#!/usr/bin/env python
# vim:fileencoding=utf-8
from __future__ import absolute_import, division, print_function, unicode_literals

from calibre.web.feeds.news import BasicNewsRecipe


class Telepolis(BasicNewsRecipe):
    title = 'Telepolis'
    __author__ = 'Lutz Epperlein'
    oldest_article = 10
    max_articles_per_feed = 200
    auto_cleanup = False
    language = 'de'
    scale_news_images = (758, 1024)
    scale_news_images_to_device = True

    feeds = [
        ('Telepolis', 'https://www.heise.de/tp/news-atom.xml'),
    ]

    remove_tags = [dict(name='p', attrs={'class': 'printversion__back-to-article printversion--hide'})]

    def get_article_url(self, article):
        return article.link + '&view=print'
