diff --git a/recipes/new_york_review_of_books.recipe b/recipes/new_york_review_of_books.recipe index 5d368ee52c..48bca9d3d7 100644 --- a/recipes/new_york_review_of_books.recipe +++ b/recipes/new_york_review_of_books.recipe @@ -62,7 +62,7 @@ class NewYorkReviewOfBooks(BasicNewsRecipe): # Find cover cover = soup.find('img', attrs={'class':'border-light-gray'}) if cover is not None: - self.cover_url = absurl(cover['src']) + self.cover_url = absurl(cover['data-lazy-src']) self.log('Found cover at:', self.cover_url) # Find date @@ -91,3 +91,8 @@ class NewYorkReviewOfBooks(BasicNewsRecipe): 'description': desc}) return [('Current Issue', articles)] + + def preprocess_html(self, soup): + for img in soup.findAll('img', attrs={'data-lazy-src':True}): + img['src'] = img['data-lazy-src'] + return soup diff --git a/recipes/new_york_review_of_books_no_sub.recipe b/recipes/new_york_review_of_books_no_sub.recipe index 29de2aebec..d179aca304 100644 --- a/recipes/new_york_review_of_books_no_sub.recipe +++ b/recipes/new_york_review_of_books_no_sub.recipe @@ -52,7 +52,7 @@ class NewYorkReviewOfBooks(BasicNewsRecipe): # Find cover cover = soup.find('img', attrs={'class':'border-light-gray'}) if cover is not None: - self.cover_url = absurl(cover['src']) + self.cover_url = absurl(cover['data-lazy-src']) self.log('Found cover at:', self.cover_url) # Find date @@ -81,3 +81,8 @@ class NewYorkReviewOfBooks(BasicNewsRecipe): 'description': desc}) return [('Current Issue', articles)] + + def preprocess_html(self, soup): + for img in soup.findAll('img', attrs={'data-lazy-src':True}): + img['src'] = img['data-lazy-src'] + return soup