diff --git a/recipes/caravan_magazine.recipe b/recipes/caravan_magazine.recipe index fc95d54934..1d5ffab35a 100644 --- a/recipes/caravan_magazine.recipe +++ b/recipes/caravan_magazine.recipe @@ -28,14 +28,15 @@ class CaravanMagazine(BasicNewsRecipe): no_stylesheets = True keep_only_tags = [ - classes('post-title short-desc author-details cover'), - dict(itemprop='articleBody'), + classes('post-title short-desc author-details cover'), + dict(itemprop='articleBody'), ] remove_tags = [ dict(name='meta'), - dict(attrs={'class': ['share-with']}), + dict(attrs={'class': ['share-with', 'img-wrap abs']}), ] + remove_attributes = ['style'] def get_browser(self, *args, **kw): br = BasicNewsRecipe.get_browser(self, *args, **kw) @@ -97,4 +98,6 @@ class CaravanMagazine(BasicNewsRecipe): for div in soup.findAll(itemprop='image'): for img in div.findAll('img'): img['src'] = div['content'] + for img in soup.findAll(attrs={'data-src': True}): + img['src'] = img['data-src'] return soup diff --git a/recipes/caravan_magazine_hindi.recipe b/recipes/caravan_magazine_hindi.recipe index 81fba7fb9f..5bebd89e60 100644 --- a/recipes/caravan_magazine_hindi.recipe +++ b/recipes/caravan_magazine_hindi.recipe @@ -35,8 +35,9 @@ class CaravanMagazineHindi(BasicNewsRecipe): remove_tags = [ dict(name='meta'), - dict(attrs={'class': ['share-with']}), + dict(attrs={'class': ['share-with', 'img-wrap abs']}), ] + remove_attributes = ['style'] def get_browser(self, *args, **kw): br = BasicNewsRecipe.get_browser(self, *args, **kw) @@ -111,4 +112,6 @@ class CaravanMagazineHindi(BasicNewsRecipe): for div in soup.findAll(itemprop='image'): for img in div.findAll('img'): img['src'] = div['content'] + for img in soup.findAll(attrs={'data-src': True}): + img['src'] = img['data-src'] return soup