mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Reduce image size in bloomberg recipes
This commit is contained in:
parent
c54a31ca5f
commit
11672c4a71
@ -124,4 +124,6 @@ class Bloomberg(BasicNewsRecipe):
|
||||
img['src'] = img['data-native-src']
|
||||
else:
|
||||
img['src'] = ''
|
||||
for img in soup.findAll('img', attrs={'src':lambda x: x and x.endswith(('-1x-1.jpg', '-1x-1.png'))}):
|
||||
img['src'] = img['src'].replace('-1x-1', '750x-1')
|
||||
return soup
|
||||
|
@ -102,4 +102,6 @@ class Bloomberg(BasicNewsRecipe):
|
||||
img['src'] = img['data-native-src']
|
||||
else:
|
||||
img['src'] = ''
|
||||
for img in soup.findAll('img', attrs={'src':lambda x: x and x.endswith(('-1x-1.jpg', '-1x-1.png'))}):
|
||||
img['src'] = img['src'].replace('-1x-1', '750x-1')
|
||||
return soup
|
||||
|
Loading…
x
Reference in New Issue
Block a user