diff --git a/recipes/open_magazine.recipe b/recipes/open_magazine.recipe index ab8db82e0e..94aab6020b 100644 --- a/recipes/open_magazine.recipe +++ b/recipes/open_magazine.recipe @@ -17,12 +17,14 @@ class OpenMagazine(BasicNewsRecipe): masthead_url = 'https://openthemagazine.com/wp-content/themes/open/images/logo.png' ignore_duplicate_articles = {'url'} extra_css = '[id^="caption-attachment"] {font-size: small;font-style: italic;}' + 'blockquote{color:#404040;}' + '.about-author{font-size:small;}' def get_cover_url(self): 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'] + self.cover_url = tag.find('img')['data-src'] return getattr(self, 'cover_url', None) keep_only_tags = [ @@ -46,3 +48,8 @@ class OpenMagazine(BasicNewsRecipe): ('Art & Culture', 'https://openthemagazine.com/art-culture/feed'), ('Cinema', 'https://openthemagazine.com/cinema/feed'), ] + + def preprocess_html(self, soup): + for img in soup.findAll('img', attrs={'data-src':True}): + img['src'] = img['data-src'] + return soup