From be521ff419d9c8925d9595b162e128cf3241cb21 Mon Sep 17 00:00:00 2001 From: morusn <17889048+morusn@users.noreply.github.com> Date: Sun, 4 Feb 2024 20:18:10 +0100 Subject: [PATCH] add ugeskriftet recipe --- recipes/ugeskriftet.recipe | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 recipes/ugeskriftet.recipe diff --git a/recipes/ugeskriftet.recipe b/recipes/ugeskriftet.recipe new file mode 100644 index 0000000000..0e7c475f31 --- /dev/null +++ b/recipes/ugeskriftet.recipe @@ -0,0 +1,36 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 + +from calibre.web.feeds.news import BasicNewsRecipe + +class Ugeskriftet(BasicNewsRecipe): + title = 'Ugeskriftet' + description = 'Ugeskriftet for læger' + language = 'dan' + __author__ = 'https://github.com/morusn' + oldest_article = 7 + publication_type = 'magazine' + max_articles_per_feed = 100 + remove_empty_feeds = True + ignore_duplicate_articles = {'title', 'url'} + recursion = 5 + encoding = 'utf-8' + keep_only_tags = [ + dict(attrs={'class': [ + 'ArticleIntro', + 'textComponent' + ]}) + ] + remove_tags = [dict(name='img')] + extra_css = """ + h1{font-weight: bold; font-size: large;} + b{font-weight: bold; font-size: medium;} + h2{font-weight: bold; font-size: large;} + h3{font-weight: bold; font-size: large;} + h4{font-weight: bold; font-size: large;} + """ + + feeds = [ + ('Ugeskriftet for læger', 'https://ugeskriftet.dk/rss/forside'), + ] + \ No newline at end of file