mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update LifeHacker
This commit is contained in:
parent
16b5bc89df
commit
1c9fb795ef
@ -29,7 +29,15 @@ class LifeHacker(BasicNewsRecipe):
|
||||
classes('headline author post-content'),
|
||||
]
|
||||
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')]
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user