From 817d45f6da00e8f2648a2c9c875adacd1ecdb167 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 8 Apr 2022 07:00:43 +0530 Subject: [PATCH] Add cover to TOI --- recipes/toi.recipe | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/toi.recipe b/recipes/toi.recipe index 3dfdaaa9dc..ebe7c52712 100644 --- a/recipes/toi.recipe +++ b/recipes/toi.recipe @@ -67,6 +67,11 @@ class TheEconomicTimes(BasicNewsRecipe): # For mobile version # return 'http://m.timesofindia.com/PDAET/articleshow/' + article_id + def get_cover_url(self): + soup = self.index_to_soup('https://www.magzter.com/IN/Bennett-Coleman-and-Company-Limited/The-Times-of-India-Delhi/Newspaper/') + for citem in soup.findAll('meta', content=lambda s: s and s.endswith('view/3.jpg')): + return citem['content'] + def get_article_url(self, article): rurl = article.get('guid', None) if '/articleshow/' in rurl: