pawliczka / luxmedsniper Goto Github PK
View Code? Open in Web Editor NEWLUX MED appointments sniper
License: MIT License
LUX MED appointments sniper
License: MIT License
ERROR 'access_token'
{'Errors': [{'ErrorCode': 301, 'Message': 'The currently installed version of the application is not supported by the new Patient Portal system. Please update the application to the latest version to use it.', 'AdditionalData': {'ShopUrl': 'market://details?id=pl.luxmed.pp', 'FallbackUrl': 'http://play.google.com/store/apps/details?id=pl.luxmed.pp', 'Title': 'Update the application'}}]}
2024-05-28 12:21:47 raspberrypi main[15025] INFO LuxMedSniper - Lux Med Appointment Sniper
2024-05-28 12:21:47 raspberrypi LuxMedSniper[15025] INFO LuxMedSniper logger initialized
2024-05-28 12:21:47 raspberrypi LuxMedSniper[15025] INFO Successfully received an access token!
2024-05-28 12:21:48 raspberrypi LuxMedSniper[15025] INFO Successfully logged in!
2024-05-28 12:21:48 raspberrypi main[15025] ERROR Expecting value: line 4 column 1 (char 6)
Czy ktoś może pomóc? Przestało mi działać...
When I try to find appointment using your script for usg tarczycy
in Warsaw (passing 1 as cityId and 4360 as serviceVariantId) I receive a lot of possible results. But afterwards trying to find apppointments using Luxmed website or android app shows none possible appointments (or very few).
I also tried to test some other service, for example Optometrysta - dobór szkieł okularowych
(12754) and for that case the results seem to be OK.
Does luxmed hide possible visits for some groups of patients? But your script logs me there so it should be the same.
Or maybe it has something to do with user agent (which iPhone) in your script or some parameters which you pass to luxmed API? Maybe these are not passed when a human uses browses website or uses android app.
I have checked the LuxMed pages and I don't know how did you find the names of the fields to send the data to PartialSearch page. I checked in my browser and fields are named 'doctorIds', not 'DoctorMultiIdentyfier' etc. How did you deduce the 'DoctorMultiIdentyfier' name? This is interesting...
Anyways, the value of the DoctorMultiIdentyfier
is invalid and doesn't work when I put the values "[xxxx,yyyy]" etc.
Could you describe the proper values to be put there?
Wygląda na to, że api luxmedowe się zmieniło (nowy portal) i w chwili obecnej skrypt odwołując się do starego api wskazuje na wolne terminy, których portal pacjenta nie pokazuje.
Przy ustawieniu:
luxmedsniper:
doctor_locator_id: -1*13410*-1*-1 # (cityId, serviceVariantId, facilitiesIds, doctorsIds) -1 means any.
# You can get those ids by reading form data sent to https://portalpacjenta.luxmed.pl/PatientPortal/Reservations/Reservation/PartialSearch
# on https://portalpacjenta.luxmed.pl/PatientPortal/Reservations/Reservation/Search by Chrome dev tools
lookup_time_days: 3 # How many days from now should script look at.
nie znajduje żadnych terminów konsultacji telefonicznej z internistą, choć na stronie widać wolne terminy za 3 dni. Próbowałem również z ustawionym cityId - efekt ten sam. Luxmed teraz wyszukuje konsultacje telefoniczne w całej Polsce -może coś się zmieniło w API?
[edit]
Po krótkim researchu, wygląda na to, że portal pacjenta bierze terminy stąd:
https://portalpacjenta.luxmed.pl/PatientPortal/NewPortal/terms/oneDayTerms?cityId=*redacted*&serviceVariantId=13410&languageId=10&searchDateFrom=2023-11-16&searchDateTo=2023-11-16&processId=*redacted*&searchByMedicalSpecialist=false&expectedTermsNumber=*redacted*&delocalized=false
na zapytanie ze skryptu w tym miejscu https://github.com/pawliczka/LuxmedSniper/blob/master/luxmedSnip.py#L142 portal pachenta zwraca http/500
logi:
2023-09-19 09:52:56 skynet LuxMedSniper[952424] INFO LuxMedSniper logger initialized
2023-09-19 09:52:57 skynet LuxMedSniper[952424] INFO Successfully received an access token!
2023-09-19 09:52:57 skynet LuxMedSniper[952424] INFO Successfully logged in!
2023-09-19 09:52:57 skynet main[952424] ERROR Expecting value: line 2 column 1 (char 2)
python -m pip install -r requirements.txt
Fails with:
Collecting python-pushover==0.4
Downloading python-pushover-0.4.tar.gz (19 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in python-pushover setup command: use_2to3 is invalid.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Hi, your project LuxmedSniper(commit id: 493906b) requires "schedule==0.6.0" in its dependency. After analyzing the source code, we found that the following versions of schedule can also be suitable, i.e., schedule 0.4.3, 0.5.0, 1.0.0, since all functions that you directly (2 APIs: schedule.init.every, schedule.init.run_pending) or indirectly (propagate to 4 schedule's internal APIs and 0 outsider APIs) used from the package have not been changed in these versions, thus not affecting your usage.
Therefore, we believe that it is quite safe to loose your dependency on schedule from "schedule==0.6.0" to "schedule>=0.4.3,<=1.0.0". This will improve the applicability of LuxmedSniper and reduce the possibility of any further dependency conflict with other projects.
May I pull a request to further loosen the dependency on schedule?
By the way, could you please tell us whether such an automatic tool for dependency analysis may be potentially helpful for maintaining dependencies easier during your development?
Hello, did you figure out maybe how to make a reservation automatically?
Mimo ustawienia w konfiguracji zmiennych dla facilitiesIds
oraz doctorId
, api Luxmed zwraca wszystkie wizyty na podstawie pozostałych parametrów, a filtrowanie po placówkach i lekarzach robi na froncie. Tym samym skrypt działa błędnie, bo nawet jeżeli wskazujemy konkretnego lekarza, to przychodzą powiadomienia o innych dla tej specjalizacji i zakresu dat (bo tak zwraca api).
Trzeba dołożyć odpowiednie filtrowanie przed przekazaniem do _parseVisitsNewPortal
lub już w tej funkcji, tak aby zasymulować to, co jest robione na froncie.
Hi Paweł,
First things first - many thanks for putting this together. I've been a heavy user for
the past couple of months & found it really useful. Kudos!
There's one thing I've noticed recently. Not sure if the API has changed or if there's another reason, but the tool doesn't find any visits anymore, even in cases when there's an abundance of them to chose from.
This is probably not related to captcha's introduced some time ago, as I recall the tool was working fine for several weeks despite them being in place both in the mobile app, as well as the web app (at least for my very active user).
I've ensured all the params I use are correct.
My last notifications about properly found visits are from March the 28th.
Thanks in advance for looking into this!
Wyniki, które są zwracane przez API pod kluczem AvailableVisitsTermPresentation
mają pole IsFree
oznaczone jako False
. Nie udało mi się znaleźć takich wyników, które miały by tam True
. Jest to dziwne ponieważ:
AvailableVisitsTermPresentation
powinien zwracać terminy dostępnePrzy probie odpalenia aplikacjia w momencie requestowania access tokena zwracany jest json z informacja o niekomaptybilnosci
{'Errors': [{'ErrorCode': 301, 'Message': 'The currently installed version of the application is not supported by the new Patient Portal system. Please update the application to the latest version to use it.', 'AdditionalData': {'ShopUrl': 'market://details?id=pl.luxmed.pp', 'FallbackUrl': 'http://play.google.com/store/apps/details?id=pl.luxmed.pp', 'Title': 'Update the application'}}]}
Chetnie pomoge jednakze przydalyby sie jakies wskazkowki ;)
Hi,
my config:
doctor_locator_id: 3*4549*-1*16419 #krakow/endokrynolog/any/a.makowska-mietla
script output:
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-17T08:40:00 at LX Kraków - Opolska 110 (Utrudnione parkowanie) - lek. med. AGNIESZKA BIK
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T09:30:00 at LX Kraków - Jasnogórska 11 - dr n. med. TOMASZ ISKRA
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T09:50:00 at LX Kraków - Jasnogórska 11 - dr n. med. TOMASZ ISKRA
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T10:20:00 at LX Kraków - Słowackiego 64 - lek. med. ZBIGNIEW JABŁOŃSKI
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T10:30:00 at LX Kraków - Jasnogórska 11 - dr n. med. TOMASZ ISKRA
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T10:40:00 at LX Kraków - Słowackiego 64 - lek. med. ZBIGNIEW JABŁOŃSKI
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T11:10:00 at LX Kraków - Jasnogórska 11 - dr n. med. TOMASZ ISKRA
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T11:30:00 at LX Kraków - Jasnogórska 11 - dr n. med. TOMASZ ISKRA
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T11:50:00 at LX Kraków - Jasnogórska 11 - dr n. med. TOMASZ ISKRA
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T12:10:00 at LX Kraków - Jasnogórska 11 - dr n. med. TOMASZ ISKRA
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T12:30:00 at LX Kraków - Jasnogórska 11 - dr n. med. TOMASZ ISKRA
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T12:50:00 at LX Kraków - Jasnogórska 11 - dr n. med. TOMASZ ISKRA
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T15:00:00 at LX Kraków - Lubelska 29 - lekarz ANETA ZACHARA
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Notification was already sent.
2023-04-16 03:37:17 skynet LuxMedSniper[114375] INFO Appointment found! 2023-04-28T15:20:00 at LX Kraków - Lubelska 29 - lekarz ANETA ZACHARA
Bot nie chciał działać u mnie, doszedłem do tego że w zapytaniu brakuje parametru referralId, bez niego LuxMed zwraca info że brak dostępnych terminów, nie mam pojęcia co powinno być w tej wartości, wpisałem tam ręcznie swoje referralId z przeglądarki i działa (wygląda na to, że się ono nie zmienia).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.