Update LifeHacker

This commit is contained in:
Kovid Goyal 2017-05-25 07:20:50 +05:30
parent 16b5bc89df
commit 1c9fb795ef
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -29,7 +29,15 @@ class LifeHacker(BasicNewsRecipe):
classes('headline author post-content'), classes('headline author post-content'),
] ]
remove_tags = [ remove_tags = [
classes('commerce-inset'), classes('commerce-inset gmg-avatar js_ad-dynamic'),
dict(id='lifehacker-avatar-svg'),
] ]
remove_tags_after = classes('post-content')
feeds = [(u'Articles', u'https://lifehacker.com/rss')] feeds = [(u'Articles', u'https://lifehacker.com/rss')]
def preprocess_soup(self, soup):
for source in soup.findAll('source', attrs={'data-srcset':True}):
for img in source.findAll('img'):
img['src'] = source['data-srcset']
return soup