From 4db135e6b22c844a527286ff9923b2677b56c846 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 21 Apr 2020 14:08:09 +0530 Subject: [PATCH] Update London Review of Books --- recipes/lrb.recipe | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes/lrb.recipe b/recipes/lrb.recipe index 19028de686..e4d2717a3b 100644 --- a/recipes/lrb.recipe +++ b/recipes/lrb.recipe @@ -51,6 +51,13 @@ class LondonReviewOfBooksPayed(BasicNewsRecipe): raise ValueError('Failed to login check username and password') return br + def preprocess_html(self, soup): + for img in soup.findAll('img', attrs={'data-srcset': True}): + for x in img['data-srcset'].split(): + if '/' in x: + img['src'] = x + return soup + def parse_index(self): articles = [] soup = self.index_to_soup(self.INDEX)