mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
b6d7f624f4
commit
5457ba9e49
@ -14,8 +14,10 @@ class EpochTimes(BasicNewsRecipe):
|
|||||||
ignore_duplicate_articles = {'url'}
|
ignore_duplicate_articles = {'url'}
|
||||||
remove_attributes = ['height', 'width', 'style']
|
remove_attributes = ['height', 'width', 'style']
|
||||||
remove_empty_feeds = True
|
remove_empty_feeds = True
|
||||||
|
no_stylesheets = True
|
||||||
resolve_internal_links = True
|
resolve_internal_links = True
|
||||||
masthead_url = 'https://epochtimes-ny.newsmemory.com/eeLayout/epochtimes/1.0.a/images/webapp/banner.png'
|
masthead_url = 'https://epochtimes-ny.newsmemory.com/eeLayout/epochtimes/1.0.a/images/webapp/banner.png'
|
||||||
|
extra_css = '.post_caption, .text-sm {font-size:small;}'
|
||||||
|
|
||||||
keep_only_tags = [
|
keep_only_tags = [
|
||||||
dict(name='article')
|
dict(name='article')
|
||||||
@ -23,6 +25,7 @@ class EpochTimes(BasicNewsRecipe):
|
|||||||
remove_tags = [
|
remove_tags = [
|
||||||
classes('print:hidden h-header shortcode aspect-square'),
|
classes('print:hidden h-header shortcode aspect-square'),
|
||||||
dict(name='button'),
|
dict(name='button'),
|
||||||
|
dict(name='img', attrs={'src':lambda x: x and x.endswith('svg')})
|
||||||
]
|
]
|
||||||
|
|
||||||
# feeds can be found at https://www.theepochtimes.com/rssfeeds
|
# feeds can be found at https://www.theepochtimes.com/rssfeeds
|
||||||
@ -43,4 +46,6 @@ class EpochTimes(BasicNewsRecipe):
|
|||||||
def preprocess_html(self, soup):
|
def preprocess_html(self, soup):
|
||||||
for img in soup.findAll('img', attrs={'data-src': True}):
|
for img in soup.findAll('img', attrs={'data-src': True}):
|
||||||
img['src'] = img['data-src']
|
img['src'] = img['data-src']
|
||||||
|
for fig_c in soup.findAll('figcaption'):
|
||||||
|
fig_c['class'] = 'post_caption'
|
||||||
return soup
|
return soup
|
||||||
|
@ -39,7 +39,7 @@ class IndianExpress(BasicNewsRecipe):
|
|||||||
' storytags pdsc-related-modify news-guard premium-story append_social_share'
|
' storytags pdsc-related-modify news-guard premium-story append_social_share'
|
||||||
' digital-subscriber-only h-text-widget ie-premium ie-first-publish adboxtop adsizes immigrationimg'
|
' digital-subscriber-only h-text-widget ie-premium ie-first-publish adboxtop adsizes immigrationimg'
|
||||||
'next-story-wrap ie-ie-share next-story-box brand-logo quote_section ie-customshare'
|
'next-story-wrap ie-ie-share next-story-box brand-logo quote_section ie-customshare'
|
||||||
' custom-share o-story-paper-quite ie-network-commenting audio-player-tts-sec'
|
' custom-share o-story-paper-quite ie-network-commenting audio-player-tts-sec o-story-list'
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user