correction order get and post request
This commit is contained in:
parent
7112858874
commit
34b6b0cde1
1 changed files with 4 additions and 7 deletions
11
main.py
11
main.py
|
@ -53,16 +53,13 @@ class Universite:
|
||||||
# récupération notes
|
# récupération notes
|
||||||
resultat = {}
|
resultat = {}
|
||||||
for annee in annees:
|
for annee in annees:
|
||||||
reponse = session.post(url)
|
|
||||||
script = annee.attrs["onclick"][7:]
|
|
||||||
reponse.html.render(script=script)
|
|
||||||
resultat[annee.text] = None
|
resultat[annee.text] = None
|
||||||
|
|
||||||
url = url.replace("notes", "detailnotes")
|
reponse.html.render(script=annee.attrs["onclick"][7:])
|
||||||
reponse = session.get(url)
|
reponse = session.post(url.replace("render", "action").replace("detail", ""))
|
||||||
url = url.replace("detailnotes", "notes")
|
|
||||||
self.ecrirePageHTML(annee.text, reponse.text)
|
|
||||||
|
|
||||||
|
reponse = session.get(url.replace("action", "render").replace("notes", "detailnotes"))
|
||||||
|
self.ecrirePageHTML(annee.text, reponse.text)
|
||||||
|
|
||||||
return resultat
|
return resultat
|
||||||
|
|
||||||
|
|
Reference in a new issue