mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ignore failures to set the timefmt in the LRB recipe
This commit is contained in:
parent
ba5f3cdce7
commit
77966f6c7d
@ -45,8 +45,11 @@ 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(r'<br\s*/>', dates)[1])
|
||||
self.timefmt = ' [%s]' % newdates
|
||||
try:
|
||||
newdates = re.sub(r'\<.*\>', '', re.split(r'<br\s*/>', dates)[1])
|
||||
self.timefmt = ' [%s]' % newdates
|
||||
except Exception:
|
||||
pass
|
||||
lrbtitle = self.title
|
||||
if cover_item:
|
||||
self.cover_url = re.sub('/m/', '/l/', cover_item.a.img['src'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user