Update reuters.recipe

images too large.
This commit is contained in:
unkn0w7n 2023-10-13 11:31:14 +05:30
parent ac7957941f
commit c59cdc2963

View File

@ -101,3 +101,8 @@ class Reuters(BasicNewsRecipe):
article['url'] = 'https://{}{}'.format(base, article['url'])
yield article
self.log('\t', article['title'], article['url'])
def preprocess_html(self, soup):
for img in soup.findAll('img', attrs={'srcset':True}):
img['src'] = img['srcset'].split()[0]
return soup