This commit is contained in:
unkn0w7n 2024-01-09 19:22:02 +05:30
parent 3a80ef8329
commit 3a4d42304f
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ class NewScientist(BasicNewsRecipe):
if time:
time.name = 'div'
for img in soup.findAll('img', attrs={'data-src':True}):
img['src'] = img['data-src'].replace('?width=1200', '?width=700')
img['src'] = img['data-src'].split('?')[0] + '?width=700'
for figc in soup.findAll('figcaption'):
for p in figc.findAll('p'):
p.name = 'div'

View File

@ -103,7 +103,7 @@ class NewScientist(BasicNewsRecipe):
if time:
time.name = 'div'
for img in soup.findAll('img', attrs={'data-src':True}):
img['src'] = img['data-src'].replace('?width=1200', '?width=700')
img['src'] = img['data-src'].split('?')[0] + '?width=700'
for figc in soup.findAll('figcaption'):
for p in figc.findAll('p'):
p.name = 'div'