correct " and '
This commit is contained in:
parent
3464da3c9e
commit
760775c604
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
@ -18,7 +18,7 @@ class Universite:
|
||||||
|
|
||||||
def ecrirePageHTML(self, texte):
|
def ecrirePageHTML(self, texte):
|
||||||
"""Affiche la page HTML pour le debug."""
|
"""Affiche la page HTML pour le debug."""
|
||||||
with open("page.html", "w") as f:
|
with open("page.html", 'w') as f:
|
||||||
f.write(texte)
|
f.write(texte)
|
||||||
|
|
||||||
def recuperationNotes(self):
|
def recuperationNotes(self):
|
||||||
|
@ -55,8 +55,8 @@ class Universite:
|
||||||
for attrs in soup.findAll("table"):
|
for attrs in soup.findAll("table"):
|
||||||
try:
|
try:
|
||||||
texte = str(attrs).split("thead")[1][2:-2]
|
texte = str(attrs).split("thead")[1][2:-2]
|
||||||
while ' ' in texte:
|
while " " in texte:
|
||||||
texte = texte.replace(' ', ' ')
|
texte = texte.replace(" ", ' ')
|
||||||
return texte
|
return texte
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
Reference in a new issue