diff --git a/recipes/livemint.recipe b/recipes/livemint.recipe index c49cb45a8b..67e2f8678b 100644 --- a/recipes/livemint.recipe +++ b/recipes/livemint.recipe @@ -66,6 +66,9 @@ class LiveMint(BasicNewsRecipe): def preprocess_html(self, soup): if h2 := soup.find('h2'): h2.name = 'p' + for also in soup.findAll('h2'): + if self.tag_to_string(also).strip().startswith('Also'): + also.extract() for img in soup.findAll('img', attrs={'data-img': True}): img['src'] = img['data-img'] return soup @@ -95,6 +98,7 @@ class LiveMint(BasicNewsRecipe): classes('contentSec') ] remove_tags = [ + dict(name=['meta', 'link', 'svg', 'button', 'iframe']), classes( 'trendingSimilarHeight moreNews mobAppDownload label msgError msgOk taboolaHeight' ' socialHolder imgbig disclamerText disqus-comment-count openinApp2 lastAdSlot' @@ -138,6 +142,9 @@ class LiveMint(BasicNewsRecipe): return raw def preprocess_html(self, soup): + for strong in soup.findAll('strong'): + if strong.find('p'): + strong.name = 'div' for embed in soup.findAll('div', attrs={'class':'embed'}): if nos := embed.find('noscript'): nos.name = 'span'