Skip to content

Commit

Permalink
Merge pull request #40 from proz89/reformat-multiple-searching-bump-v…
Browse files Browse the repository at this point in the history
…ersions-py-3-13

reformat according to pep; allow multiple doctor-locator searching; b…
  • Loading branch information
pawliczka authored Nov 29, 2024
2 parents b7b460f + 31a26db commit 01f90ba
Show file tree
Hide file tree
Showing 11 changed files with 19,532 additions and 377 deletions.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,37 @@ How to use LuxmedSniper?
--------------------
First of all create virtualenv and install Python requirements from requirements.txt

1) For each specialist create configuration file (yaml format) and save it for example as my_favourite_surgeon.yml:
1) For each luxmed users create configuration file (yaml format) and save it for example as luxmed_username.yml:
```
luxmed:
email: EMAIL
password: PASSWORD
luxmedsniper: # mandatory mandatory
doctor_locator_id: 5*4430*-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
luxmedsniper:
doctor_locators:
- id: 1*7409*-1*-1 # (cityId, serviceVariantId, facilitiesIds, doctorsIds) -1 means any.
# You can get those ids by calling script with "--dump-ids" argument: python3 luxmed_sniper.py --dump-ids
name: Your unique search name
enabled: False # temporary disable from searching
- id: 1*7681*-1*-1
name: Your unique search name 2
enabled: True
lookup_time_days: 14 # How many days from now should script look at.
pushover:
user_key: # Your pushover.net user key
api_token: # pushover.net App API Token
message_template: "New visit! {AppointmentDate} at {ClinicPublicName} - {DoctorName}"
title: "New Lux Med visit available!" # Pushover message topic
misc:
notifydb: ./surgeon_data # State file used to remember which notifications has been sent already
notifydb: ./notifications-{email}.db # State file used to remember which notifications has been sent already
```

2) Run it
```
nohup python3 luxmedSnip.py -c /path/to/my_favourite_surgeon.yml &
nohup python3 luxmed_sniper.py -c /path/to/luxmed_john.yml &
```
or you can split the configuration into separate users/doctors/providers config files
```
nohup python3 luxmedSnip.py -c user_config.yml my_favourite_surgeon.yml &
nohup python3 luxmed_sniper.py -c user_config.yml luxmed_john.yml &
```
3) Wait for new appointment notifications in your pushover app on mobile :)!

Expand Down
126 changes: 126 additions & 0 deletions luxmed-ids/ids-cities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
[
{
"id": 70,
"name": "Białystok"
},
{
"id": 12,
"name": "Bielsk Podlaski"
},
{
"id": 100,
"name": "Bielsko-Biała"
},
{
"id": 10,
"name": "Bydgoszcz"
},
{
"id": 84,
"name": "Częstochowa"
},
{
"id": 63,
"name": "Elbląg"
},
{
"id": 60,
"name": "Gorzów Wielkopolski"
},
{
"id": 88,
"name": "Inowrocław"
},
{
"id": 101,
"name": "Kalisz"
},
{
"id": 17,
"name": "Katowice - Gliwice - Tychy"
},
{
"id": 85,
"name": "Kłobuck"
},
{
"id": 43,
"name": "Konin"
},
{
"id": 71,
"name": "Kostrzyn nad Odrą"
},
{
"id": 3,
"name": "Kraków"
},
{
"id": 49,
"name": "Lublin"
},
{
"id": 87,
"name": "Lubliniec"
},
{
"id": 89,
"name": "Łomża"
},
{
"id": 4,
"name": "Łódź"
},
{
"id": 80,
"name": "Mielec"
},
{
"id": 99,
"name": "Nowa Sól"
},
{
"id": 112,
"name": "Nowy Sącz"
},
{
"id": 20,
"name": "Olsztyn"
},
{
"id": 21,
"name": "Opole"
},
{
"id": 8,
"name": "Poznań"
},
{
"id": 74,
"name": "Rzeszów"
},
{
"id": 24,
"name": "Szczecin"
},
{
"id": 73,
"name": "Toruń"
},
{
"id": 45,
"name": "Trójmiasto"
},
{
"id": 81,
"name": "Wałbrzych"
},
{
"id": 1,
"name": "Warszawa"
},
{
"id": 5,
"name": "Wrocław"
}
]
Loading

0 comments on commit 01f90ba

Please sign in to comment.