mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update news.py
This commit is contained in:
parent
1840b7469a
commit
ca4fe17dbe
@ -1096,7 +1096,10 @@ class BasicNewsRecipe(Recipe):
|
|||||||
# Nuke HTML5 tags
|
# Nuke HTML5 tags
|
||||||
for x in ans.findAll(['article', 'aside', 'header', 'footer', 'nav',
|
for x in ans.findAll(['article', 'aside', 'header', 'footer', 'nav',
|
||||||
'figcaption', 'figure', 'section']):
|
'figcaption', 'figure', 'section']):
|
||||||
x.get_attribute_list('class').append(f'calibre-nuked-tag-{x.name}')
|
if x.get('class'):
|
||||||
|
x.get_attribute_list('class').append(f'calibre-nuked-tag-{x.name}')
|
||||||
|
else:
|
||||||
|
x['class'] = f'calibre-nuked-tag-{x.name}'
|
||||||
x.name = 'div'
|
x.name = 'div'
|
||||||
|
|
||||||
if job_info:
|
if job_info:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user