View Single Post
Old 11-10-2017, 04:28 PM   #1
lutze
Junior Member
lutze began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2017
Device: tolino vision 2
New recipe for Telepolis

The current recipe for the german online magazine Telepolis is broken. I tried a new one:
Code:
#!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe


class Telepolis(BasicNewsRecipe):
    title = 'Telepolis'
    __author__ = 'Lutz Epperlein'
    oldest_article = 7
    max_articles_per_feed = 100
    auto_cleanup   = False
    language = 'de'

    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"
Works well so far, at least in my calibre installation. Please have a look.

Regards
Lutz
lutze is offline   Reply With Quote