mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix images in kommersant
This commit is contained in:
parent
9f07e9aa8f
commit
20e41c7367
@ -7,7 +7,7 @@ __copyright__ = '2010-2013, Darko Miletic <darko.miletic at gmail.com>'
|
||||
www.kommersant.ru
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
||||
|
||||
|
||||
class Kommersant_ru(BasicNewsRecipe):
|
||||
@ -40,12 +40,18 @@ class Kommersant_ru(BasicNewsRecipe):
|
||||
dict(name='div', attrs={'id': 'lenta'}),
|
||||
dict(name='div', attrs={'class': 'layout basement_news__body'}),
|
||||
dict(name='footer', attrs={'class': 'footer'}),
|
||||
dict(name='div', attrs={'class': 'ui-modal'}),
|
||||
dict(name='section', attrs={'class': 'potd'}),
|
||||
dict(name='footer', attrs={'class': 'doc_footer'}),
|
||||
dict(name='div', attrs={'class': 'adv_interscroll hide_desktop'})
|
||||
classes('ui-modal__hide'),
|
||||
dict(name='div', attrs={'class': 'adv_interscroll hide_desktop'}),
|
||||
dict(name=['button', 'source']),
|
||||
]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for tag in soup.findAll(attrs={'data-lazyimage-src': True}):
|
||||
tag['src'] = tag['data-lazyimage-src']
|
||||
return soup
|
||||
|
||||
feeds = [
|
||||
(
|
||||
'\u0413\u043B\u0430\u0432\u043D\u043E\u0435',
|
||||
|
Loading…
x
Reference in New Issue
Block a user