From c52f11532b28f032060a1e598c2ba949031b8a40 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 29 Jun 2022 19:57:21 +0530 Subject: [PATCH] ... --- recipes/india_today.recipe | 6 +++--- recipes/open_magazine.recipe | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes/india_today.recipe b/recipes/india_today.recipe index 44f6d077ab..fb6d4a77af 100644 --- a/recipes/india_today.recipe +++ b/recipes/india_today.recipe @@ -16,9 +16,9 @@ class IndiaToday(BasicNewsRecipe): masthead_url = 'https://akm-img-a-in.tosshub.com/sites/all/themes/itg/logo.png' def get_cover_url(self): - soup = self.index_to_soup('https://www.magzter.com/IN/India-Today-Group/India-Today/News/') - for citem in soup.findAll('meta', content=lambda s: s and s.endswith('view/3.jpg')): - return citem['content'] + soup = self.index_to_soup('https://www.readwhere.com/magazine/the-india-today-group/India-Today/1154') + for citem in soup.findAll('meta', content=lambda s: s and s.endswith('/magazine/300/new')): + return citem['content'].replace('300', '600') keep_only_tags = [ dict(name='h1'), diff --git a/recipes/open_magazine.recipe b/recipes/open_magazine.recipe index 3fa0f4467b..ab8db82e0e 100644 --- a/recipes/open_magazine.recipe +++ b/recipes/open_magazine.recipe @@ -19,11 +19,11 @@ class OpenMagazine(BasicNewsRecipe): extra_css = '[id^="caption-attachment"] {font-size: small;font-style: italic;}' def get_cover_url(self): - soup = self.index_to_soup('https://openthemagazine.com/magazine/') - tag = soup.find(attrs={'class': 'mb-2 right-image'}) + soup = self.index_to_soup('https://openthemagazine.com/') + tag = soup.find(attrs={'class': 'magazine-item mr-1'}) if tag: self.cover_url = tag.find('img')['src'] - return super().get_cover_url() + return getattr(self, 'cover_url', None) keep_only_tags = [ classes('post-data post-thumb post-meta post-excerp'),