Update London Review of Books

Fixes #1829339 [Private bug](https://bugs.launchpad.net/calibre/+bug/1829339)
This commit is contained in:
Kovid Goyal 2019-05-18 15:01:14 +05:30
parent 69f29dc1e1
commit 6e414d293b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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('<br />', dates)[1])
newdates = re.sub(r'\<.*\>', '', re.split(r'<br\s*/>', dates)[1])
self.timefmt = ' [%s]' % newdates
lrbtitle = self.title
if cover_item: