From e1dee20448d6fdd76309a8a3b5a21fa577e4ce6a Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Sat, 7 Dec 2024 22:54:21 +0530 Subject: [PATCH] irish times add desc --- recipes/irish_times_free.recipe | 5 +++++ recipes/list_apart.recipe | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/recipes/irish_times_free.recipe b/recipes/irish_times_free.recipe index 5e52def5b6..625bd4b4e4 100644 --- a/recipes/irish_times_free.recipe +++ b/recipes/irish_times_free.recipe @@ -94,3 +94,8 @@ class IrishTimes(BasicNewsRecipe): for img in soup.findAll('img', attrs={'srcset': True}): img['src'] = img['srcset'].split()[0] return soup + + def populate_article_metadata(self, article, soup, first): + desc = soup.find(**classes('b-it-subheadline')) + if desc: + article.summary = article.text_summary = self.tag_to_string(desc) diff --git a/recipes/list_apart.recipe b/recipes/list_apart.recipe index 01c01f30c5..3a39ab1934 100644 --- a/recipes/list_apart.recipe +++ b/recipes/list_apart.recipe @@ -21,6 +21,12 @@ class AListApart (BasicNewsRecipe): encoding = 'utf8' cover_url = u'https://alistapart.com/wp-content/uploads/2019/03/cropped-icon_navigation-laurel-512.jpg' + def __init__(self, *args, **kwargs): + BasicNewsRecipe.__init__(self, *args, **kwargs) + d = self.recipe_specific_options.get('days') + if d and isinstance(d, str): + self.oldest_article = float(d) + def get_extra_css(self): if not self.extra_css: br = self.get_browser()