mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Project Syndicate
This commit is contained in:
parent
9cc8fb137e
commit
87a0130f14
@ -132,4 +132,6 @@ class ft(BasicNewsRecipe):
|
||||
for con in soup.findAll(attrs={'class':'n-content-layout__slot'}):
|
||||
if con.find('figure'):
|
||||
con['id'] = 'fig'
|
||||
if h3 := soup.find(**classes('o-topper__standfirst')):
|
||||
h3.name = 'h3'
|
||||
return soup
|
||||
|
@ -98,7 +98,7 @@ class LiveMint(BasicNewsRecipe):
|
||||
classes(
|
||||
'trendingSimilarHeight moreNews mobAppDownload label msgError msgOk taboolaHeight'
|
||||
' socialHolder imgbig disclamerText disqus-comment-count openinApp2 lastAdSlot'
|
||||
' datePublish sepStory premiumSlider moreStory'
|
||||
' datePublish sepStory premiumSlider moreStory Joinus'
|
||||
)
|
||||
]
|
||||
|
||||
@ -149,6 +149,9 @@ class LiveMint(BasicNewsRecipe):
|
||||
span.extract()
|
||||
for img in soup.findAll('img', attrs={'data-src': True}):
|
||||
img['src'] = img['data-src']
|
||||
if wa := soup.find(**classes('autobacklink-topic')):
|
||||
if p := wa.findParent('p'):
|
||||
p.extract()
|
||||
return soup
|
||||
|
||||
def populate_article_metadata(self, article, soup, first):
|
||||
|
@ -61,9 +61,10 @@ class projectsynd(BasicNewsRecipe):
|
||||
def preprocess_html(self, soup):
|
||||
for img in soup.findAll('img', attrs={'old-src':True}):
|
||||
img['src'] = img['old-src'].replace('medium', 'xlarge')
|
||||
if abst := soup.find(attrs={'itemprop':'abstract'}).find('div'):
|
||||
abst.name = 'p'
|
||||
abst['class'] = 'sub'
|
||||
if abst := soup.find(attrs={'itemprop':'abstract'}):
|
||||
if div := abst.find('div'):
|
||||
div.name = 'p'
|
||||
div['class'] = 'sub'
|
||||
for div in soup.findAll('div', attrs={'data-line-id':True}):
|
||||
div.name = 'p'
|
||||
for a in soup.findAll('a', href=True):
|
||||
|
Loading…
x
Reference in New Issue
Block a user