Substitution des espaces insécables
This commit is contained in:
parent
79763a04c9
commit
1585d92508
@ -267,7 +267,7 @@ def analyser_resultats(file) -> dict:
|
|||||||
resultats_par_liste.append(liste)
|
resultats_par_liste.append(liste)
|
||||||
|
|
||||||
liste['nom'] = cells[0].string
|
liste['nom'] = cells[0].string
|
||||||
liste['voix'] = int(cells[2].string.replace("\n", "").replace(" ", ""))
|
liste['voix'] = int(cells[2].string.replace("\n", "").replace(" ", "").replace("\u202f", "").strip())
|
||||||
elif table.find('td', text=re.compile("Inscrits")):
|
elif table.find('td', text=re.compile("Inscrits")):
|
||||||
tbody = table.tbody
|
tbody = table.tbody
|
||||||
for line in tbody.find_all('tr'):
|
for line in tbody.find_all('tr'):
|
||||||
@ -276,7 +276,7 @@ def analyser_resultats(file) -> dict:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
nom = cells[0].string
|
nom = cells[0].string
|
||||||
number = int(cells[1].string.replace(" ", ""))
|
number = int(cells[1].string.replace("\n", "").replace(" ", "").replace("\u202f", "").strip())
|
||||||
match nom:
|
match nom:
|
||||||
case "Inscrits":
|
case "Inscrits":
|
||||||
parsed_data["inscrits"] = number
|
parsed_data["inscrits"] = number
|
||||||
|
Loading…
Reference in New Issue
Block a user