mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-31 13:14:31 +01:00
Update Le Monde Edition Abonnes Papier
This commit is contained in:
parent
811a1d3d1e
commit
63c1aa15e4
1 changed files with 10 additions and 6 deletions
|
|
@ -130,10 +130,7 @@ def parse_index(self):
|
|||
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 @@ def parse_index(self):
|
|||
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 @@ def parse_index(self):
|
|||
flux.append((title, articles))
|
||||
|
||||
return flux
|
||||
|
||||
|
||||
# Local Variables:
|
||||
# mode: python
|
||||
# End:
|
||||
|
|
|
|||
Loading…
Reference in a new issue