mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update London Review of Books
Fixes #1829339 [Private bug](https://bugs.launchpad.net/calibre/+bug/1829339)
This commit is contained in:
parent
69f29dc1e1
commit
6e414d293b
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user