Update news.py

This commit is contained in:
unkn0w7n 2024-11-03 10:09:44 +05:30
parent 1840b7469a
commit ca4fe17dbe

View File

@ -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: