Mes choix de centre
This commit is contained in:
parent
4dbe697acf
commit
92a3578b2b
8
bot.py
8
bot.py
|
@ -10,9 +10,9 @@ import requests
|
|||
import smtplib
|
||||
|
||||
|
||||
# API_PREFIX = "https://beta.interieur.gouv.fr/candilib/api/v2/"
|
||||
API_PREFIX = "https://beta.interieur.gouv.fr/candilib/api/v2/"
|
||||
# API_PREFIX = "https://candilib.ynerant.fr/candilib/api/v2/"
|
||||
API_PREFIX = "http://localhost/candilib/api/v2/"
|
||||
# API_PREFIX = "http://localhost/candilib/api/v2/"
|
||||
|
||||
CAPTCHA_IMAGES = {
|
||||
"L'avion": "airplane",
|
||||
|
@ -168,6 +168,7 @@ def main(token: str) -> None:
|
|||
dpt.count += centre.count
|
||||
|
||||
places = Places(**api('places', token, user_id))
|
||||
if places.centre:
|
||||
for dpt in departements:
|
||||
for centre in dpt.centres:
|
||||
if centre._id == places.centre['_id']:
|
||||
|
@ -191,7 +192,8 @@ def main(token: str) -> None:
|
|||
send_mail(json.dumps(dates, indent=2), centre.nom)
|
||||
centre.dates = dates
|
||||
|
||||
PREFERRED_CENTRES = ["MASSY", "RUNGIS", "ETAMPES", "SAINT CLOUD", "SAINT PRIEST"]
|
||||
PREFERRED_CENTRES = ["MASSY", "ANTONY", "RUNGIS", "MONTGERON", "CLAMART", "SAINT CLOUD", "EVRY",
|
||||
"VILLABE", "ETAMPES", "VELIZY VILLACOUBLAY", "MAISONS ALFORT", "TRAPPES", "SAINT PRIEST"]
|
||||
|
||||
for name in PREFERRED_CENTRES:
|
||||
for dpt in departements:
|
||||
|
|
Loading…
Reference in New Issue