From 6e414d293b85ba1133fc91dc79552c8a947437f3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 18 May 2019 15:01:14 +0530 Subject: [PATCH] Update London Review of Books Fixes #1829339 [Private bug](https://bugs.launchpad.net/calibre/+bug/1829339) --- recipes/lrb_payed.recipe | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/lrb_payed.recipe b/recipes/lrb_payed.recipe index 85ed5221b2..e0396c98d2 100644 --- a/recipes/lrb_payed.recipe +++ b/recipes/lrb_payed.recipe @@ -36,7 +36,7 @@ class LondonReviewOfBooksPayed(BasicNewsRecipe): br['username'] = self.username br['password'] = self.password raw = br.submit().read() - if 'You are logged in as' not in raw: + if b'You are logged in as' not in raw: raise ValueError('Failed to log in, check username and password') return br @@ -45,7 +45,7 @@ class LondonReviewOfBooksPayed(BasicNewsRecipe): soup = self.index_to_soup(self.INDEX) cover_item = soup.find('p', attrs={'class': 'cover'}) dates = type(u'')(soup.find('span', attrs={'class': 'coverdate'})) - newdates = re.sub(r'\<.*\>', '', re.split('
', dates)[1]) + newdates = re.sub(r'\<.*\>', '', re.split(r'', dates)[1]) self.timefmt = ' [%s]' % newdates lrbtitle = self.title if cover_item: