mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Le Monde Edition Abonnes Papier
This commit is contained in:
parent
811a1d3d1e
commit
63c1aa15e4
@ -130,10 +130,7 @@ class LeMondeAbonne(BasicNewsRecipe):
|
||||
filename = os.path.join(path, "selection_%d.html" % (i + 1))
|
||||
tmp = open(filename, 'r')
|
||||
soup = BeautifulSoup(tmp, convertEntities=BeautifulSoup.HTML_ENTITIES)
|
||||
try:
|
||||
title = soup.find('span').contents[0] or 'Unknown'
|
||||
except IndexError:
|
||||
title = 'Unknown'
|
||||
title = soup.find('span').contents[0]
|
||||
if title == "Une":
|
||||
title = "À la une"
|
||||
if title == "Evenement":
|
||||
@ -147,13 +144,15 @@ class LeMondeAbonne(BasicNewsRecipe):
|
||||
if title == "Enquete":
|
||||
title = "Enquête"
|
||||
if title == "Editorial - Analyses":
|
||||
title = "Analyses"
|
||||
title = "Horizons"
|
||||
if title == "Le Monde Economie":
|
||||
title = "Économie"
|
||||
if title == "Le Monde Culture et idées":
|
||||
if title == "Lettre et chronique":
|
||||
title = "Idées"
|
||||
if title == "Le Monde Géo et politique":
|
||||
title = "Géopolitique"
|
||||
if title == "Météo - Jeux - Ecrans":
|
||||
title = "Économie & Entreprise"
|
||||
tmp.close()
|
||||
|
||||
filename = os.path.join(path, "frame_gauche_%d.html" % (i + 1))
|
||||
@ -175,3 +174,8 @@ class LeMondeAbonne(BasicNewsRecipe):
|
||||
flux.append((title, articles))
|
||||
|
||||
return flux
|
||||
|
||||
|
||||
# Local Variables:
|
||||
# mode: python
|
||||
# End:
|
||||
|
Loading…
x
Reference in New Issue
Block a user