From 3a4d42304fedf10716eec49c7b89b839cccc446a Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Tue, 9 Jan 2024 19:22:02 +0530 Subject: [PATCH] ... --- recipes/new_scientist.recipe | 2 +- recipes/new_scientist_mag.recipe | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/new_scientist.recipe b/recipes/new_scientist.recipe index 8cc1ce3349..ccbc2fc73d 100644 --- a/recipes/new_scientist.recipe +++ b/recipes/new_scientist.recipe @@ -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' diff --git a/recipes/new_scientist_mag.recipe b/recipes/new_scientist_mag.recipe index c8ca809905..c1559e51e5 100644 --- a/recipes/new_scientist_mag.recipe +++ b/recipes/new_scientist_mag.recipe @@ -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'