Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inefficacité du script quand on choisit un ou des centres #44

Open
greenskii opened this issue May 26, 2021 · 7 comments
Open

Inefficacité du script quand on choisit un ou des centres #44

greenskii opened this issue May 26, 2021 · 7 comments

Comments

@greenskii
Copy link

la boucle du script repasse tous les centres en permanence au lieu de le faire une fois en début de script pour se concentrer sur les centres sélectionnés
ce qui fait manquer des créneaux

@brewormly
Copy link

Indeed it would maybe be beneficial to specify certain centers a priori, before running the script.

@seranpion
Copy link
Contributor

seranpion commented May 28, 2021

Tu veux dire que le script est inefficace quand on utilise le paramètre --center ?
J'ai remarqué que les centres ne remontent pas tous dès la première recherche.
Parfois ils apparaissent après.

Mais je ne vois pas le risque de manquer un créneau.

@brewormly
Copy link

One could avoid calling the find_centers method and filtering the results after the call. Instead one could predefine certain centers, and one would look for appointments directly based on the agenda_ids. The advantage of this approach would be to reduce traffic on doctolib's API and to get a higher probability to get an appointment at the center you are close to.

Actually I saw that in France the demand for vaccinations is not that high (from my point of view). There are a lot of appointments available. In Germany it is a bit different right now, and the appointments are really hard to get.

@greenskii
Copy link
Author

If you look at the code and the debug text, It is obvious that by calling the find_centers and by rechecking its result in every loop to check if the centers match the asked centers and the given city, it makes for useless API calls that could be done just once at the launch of the script.
I would modify it put but I lack Python skills (the indentation rules are nightmarish)

@seranpion
Copy link
Contributor

@brewormly thank you for the insight. I personnally do have trouble to find an appointment for myself.

@greenskii I see it now while debugging. Maybe I'll try to improve that if I get the time.
I was not sure at first because I would sometime see centers appear and disappear from the same search.

@sly-net
Copy link

sly-net commented May 31, 2021

Well, it might sound strange but I think today I saw a center which changed ID while debugging the script. I'm not sure, I didn't pay much attention at that moment.

@seranpion
Copy link
Contributor

Yes, I suspect the website format is a moving target at the moment.

Anyway, these days it has become much easier to get an appointment manually.
At last I managed to get mine without this tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants