From cc26cb6443e361da0fff52b300a9107ffb7b2200 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:50:43 +0530 Subject: [PATCH] Update nytfeeds.recipe add label --- recipes/nytfeeds.recipe | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/nytfeeds.recipe b/recipes/nytfeeds.recipe index 3c86f705bb..c93203ad17 100644 --- a/recipes/nytfeeds.recipe +++ b/recipes/nytfeeds.recipe @@ -56,6 +56,10 @@ def iso_date(x): return dt.strftime('%b %d, %Y at %I:%M %p') def header_parse(h): + if h.get('label'): + if h['label'].get('content'): + for cl in h['label']['content']: + yield '
' for i in x['content']: yield '\t'.join(parse_cnt(i)) @@ -168,6 +172,8 @@ class nytFeeds(BasicNewsRecipe): .cap { font-size:small; text-align:center; } .cred { font-style:italic; font-size:small; } .sub { font-style:italic; } + .lbl { font-size:small; color:#404040; } + img { display:block; margin:0 auto; } ''' feeds = [