From 77966f6c7db4c5d530514ab41a6a20c26bc2f46b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 24 May 2019 07:44:11 +0530 Subject: [PATCH] Ignore failures to set the timefmt in the LRB recipe --- recipes/lrb_payed.recipe | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/lrb_payed.recipe b/recipes/lrb_payed.recipe index e0396c98d2..6ad46764bd 100644 --- a/recipes/lrb_payed.recipe +++ b/recipes/lrb_payed.recipe @@ -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'', dates)[1]) - self.timefmt = ' [%s]' % newdates + try: + newdates = re.sub(r'\<.*\>', '', re.split(r'', 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'])