mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
9205f188b9
commit
ded06e6b00
@ -131,7 +131,10 @@ class LeMondeAbonne(BasicNewsRecipe):
|
|||||||
filename = os.path.join(path, "selection_%d.html" % (i + 1))
|
filename = os.path.join(path, "selection_%d.html" % (i + 1))
|
||||||
tmp = open(filename, 'r')
|
tmp = open(filename, 'r')
|
||||||
soup = BeautifulSoup(tmp, convertEntities=BeautifulSoup.HTML_ENTITIES)
|
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":
|
if title == "Une":
|
||||||
title = "À la une"
|
title = "À la une"
|
||||||
if title == "Evenement":
|
if title == "Evenement":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user