Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 12-19-2020, 01:43 AM   #1
msel
Connoisseur
msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.
 
msel's Avatar
 
Posts: 73
Karma: 143132
Join Date: Sep 2010
Device: Kindle Keyboard 3G
Recipe for kath.net

The actual recipe of kath.net failed, because they have changed their website layout.

Here is a new one:

Code:
#!/usr/bin/env python
# vim:fileencoding=utf-8
from calibre.web.feeds.news import BasicNewsRecipe

class AdvancedUserRecipe1608358960(BasicNewsRecipe):
    title          = 'kath.net'
    __author__ = 'mseliger'
    description = u'Katholische Nachrichten'
    oldest_article = 7
    max_articles_per_feed = 25
    auto_cleanup   = True
    no_stylesheets = True
    encoding = 'iso-8859-1'

    feeds          = [
        ('kath.net', 'https://www.kath.net/ticker/index.xml'),
    ]
    def print_version(self, url):
        return url.replace('https://www.kath.net/news/', 'https://www.kath.net/print/')

    def get_browser(self, *a, **kwargs):
        kwargs['verify_ssl_certificates'] = False
        return BasicNewsRecipe.get_browser(self, *a, **kwargs)

    extra_css = 'td.textb {font-size: medium;}'
msel is offline   Reply With Quote
Old 12-20-2020, 01:44 PM   #2
msel
Connoisseur
msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.msel is at one with the great books of the world.
 
msel's Avatar
 
Posts: 73
Karma: 143132
Join Date: Sep 2010
Device: Kindle Keyboard 3G
Improvement: UTF-8 instead of ISO-8859-1

Code:
#!/usr/bin/env python
# vim:fileencoding=utf-8
from calibre.web.feeds.news import BasicNewsRecipe

class AdvancedUserRecipe1608358960(BasicNewsRecipe):
    title          = 'kath.net'
    __author__ = 'mseliger'
    description = u'Katholische Nachrichten'
    oldest_article = 7
    max_articles_per_feed = 25
    auto_cleanup   = True
    no_stylesheets = True
    encoding = 'UTF-8'

    feeds          = [
        ('kath.net', 'https://www.kath.net/ticker/index.xml'),
    ]
    def print_version(self, url):
        return url.replace('https://www.kath.net/news/', 'https://www.kath.net/print/')

    def get_browser(self, *a, **kwargs):
        kwargs['verify_ssl_certificates'] = False
        return BasicNewsRecipe.get_browser(self, *a, **kwargs)

    extra_css = 'td.textb {font-size: medium;}'
msel is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Kath.net" download fails Leonatus Recipes 2 11-04-2018 03:31 AM
Kath.net not working properly Leonatus Recipes 2 01-16-2017 04:42 AM
need help in trying to update .net recipe Camper65 Recipes 14 05-27-2013 04:09 PM
kath.net Bobus Recipes 2 03-20-2013 04:02 AM
.net magazine recipe cram1010 Recipes 0 07-21-2012 09:26 AM


All times are GMT -4. The time now is 04:34 PM.


MobileRead.com is a privately owned, operated and funded community.