Update nzherald.recipe

This commit is contained in:
unkn0w7n 2025-05-11 10:44:21 +05:30
parent b39a4b86a9
commit 6f463969b4

View File

@ -29,7 +29,9 @@ class NewZealandHerald(BasicNewsRecipe):
+ soup.find('img', attrs={'id': 'giornale-img'})['src']
)
extra_css = '.article-media__caption {font-size: small;}'
extra_css = '''
[data-test-ui="author--text--body"], .article-media__caption {font-size: small;}
'''
keep_only_tags = [
dict(
@ -65,6 +67,7 @@ class NewZealandHerald(BasicNewsRecipe):
for x in img['data-srcset'].split(','):
if '768w' in x:
img['src'] = x.split()[0]
break
else:
img['src'] = img['data-srcset'].split(',')[-1].split()[0]
return soup