From ded06e6b00134c352a0e24f576424702fd950953 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 1 Aug 2018 03:10:16 +0530 Subject: [PATCH] ... --- recipes/le_monde_sub_paper.recipe | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/le_monde_sub_paper.recipe b/recipes/le_monde_sub_paper.recipe index a1c621ef52..294e91d4d2 100644 --- a/recipes/le_monde_sub_paper.recipe +++ b/recipes/le_monde_sub_paper.recipe @@ -131,7 +131,10 @@ class LeMondeAbonne(BasicNewsRecipe): filename = os.path.join(path, "selection_%d.html" % (i + 1)) tmp = open(filename, 'r') soup = BeautifulSoup(tmp, convertEntities=BeautifulSoup.HTML_ENTITIES) - title = soup.find('span').contents[0] or 'Unknown' + try: + title = soup.find('span').contents[0] or 'Unknown' + except IndexError: + title = 'Unknown' if title == "Une": title = "À la une" if title == "Evenement":