GithubHelp home page GithubHelp logo

medihunter's People

Contributors

apqlzm avatar arsenictangerine avatar darekdesu avatar dependabot[bot] avatar guesswhy avatar jacekjaros avatar jaroslawjarmolowicz-tomtom avatar justaphrog avatar krzysztofkarol avatar linoskoczek avatar mek-x avatar melroy89 avatar mlewand3 avatar nowszymon avatar pewu avatar piomar123 avatar piosk7 avatar rafal-krypa avatar tjozwik avatar wojtekk78 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

medihunter's Issues

Medihunter do not search for phone visits

Im not sure what has changed but from some time this script do not shows phone visit. Actually do not find any appointments because finding stationary visits is almost impossible :)
I think that it has something in common with visitType=0 parameter in Medicover web page address .
When visitType=0 is set in web page , it do not search for phone visit, when its set to visitType=all you can search phone visit.
I think that in Medihunter it is -b, --bookingtype parameter, but it cannot be set to all...
Im running this command:
medihunter find-appointment -s $spec -r 204 --user $MEDICOVER_USER --password $MEDICOVER_PASS
where $spec is specialization with phone visit type (like Internista porada telefonicza)

Jak aktywować powiadomienia?

Jestem początkujący i mam problem z uruchomieniem powiadomień w medihunter.py

Co dokładnie powinienem zrobić z komendami

bash

export NOTIFIERS_PUSHOVER_TOKEN=avykwnqc8ohyk73mo1bsuggsm3r4qf
export NOTIFIERS_PUSHOVER_USER=s4g1zoewbzseogp4knrapx23k9yi95

Próbowałem je wpisać do kodu w medihunter.py lub wykonać w terminalu osobno ale w obu sytuacjach kod przestaje działać i wyrzuca błąd.
Mógłbyś krok po kroku opisać jak to połączyć z resztą kodu?

Z góry dzięki :)

Fresh cloned medihunter - error in `pip install --editable .`

I'd same error on previous installation of medihunter so maybe it's worth reporting it here.
Maybe it will help some else with same problems...

In freshly cloned medihunter I've error during installation:

marcin@pc:~/medihunter$ pip install --editable .
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///home/marcin/medihunter
  Preparing metadata (setup.py) ... done
Collecting appdirs
  Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting beautifulsoup4
  Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 128.2/128.2 KB 1.2 MB/s eta 0:00:00
Requirement already satisfied: click in /usr/lib/python3/dist-packages (from medihunter==0.1) (8.0.3)
Collecting lxml
  Downloading lxml-4.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (6.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.9/6.9 MB 1.2 MB/s eta 0:00:00
Collecting notifiers
  Downloading notifiers-1.3.3-py3-none-any.whl (43 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.0/44.0 KB 1.0 MB/s eta 0:00:00
Collecting python-dotenv
  Downloading python_dotenv-0.21.0-py3-none-any.whl (18 kB)
Collecting python-pushover
  Downloading python-pushover-0.4.tar.gz (19 kB)
  Preparing metadata (setup.py) ... 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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
marcin@pc:~/medihunter$ 

System details:

marcin@pc:~/medihunter$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy
marcin@pc:~/medihunter$ 

403 after log-in

Each time I try to do search I get this stacktrace.
Same user/password was used before. For some reason it stopeed working.
Passowrd is correct - just checked that.
medicover_session.py 150 response status is http_403

`
Traceback (most recent call last):
File "medihunter.py", line 282, in
medihunter()
File "/home/emil/medihunter-venv/lib/python3.7/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/emil/medihunter-venv/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/emil/medihunter-venv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/emil/medihunter-venv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/emil/medihunter-venv/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "medihunter.py", line 182, in find_appointment
disable_phone_search=disable_phone_search
File "/home/emil/medihunter/medicover_session.py", line 236, in search_appointments
appointments = self._parse_search_results(result)
File "/home/emil/medihunter/medicover_session.py", line 159, in _parse_search_results
result = result.json()
File "/home/emil/medihunter-venv/lib/python3.7/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

`

Error when installing python-pushover on python 3.11

Steps to reproduce

$ python3.11 -V
Python 3.11.2

$ python3.11 -m venv venv

$ source venv/bin/activate

$ pip install --editable .
Obtaining file:///home/r.safin/projects/medihunter
  Preparing metadata (setup.py) ... done
Collecting fake-useragent
  Using cached fake_useragent-1.1.1-py3-none-any.whl (50 kB)
Collecting click
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting requests
  Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.11.2-py3-none-any.whl (129 kB)
Collecting python-pushover
  Using cached python-pushover-0.4.tar.gz (19 kB)
  Preparing metadata (setup.py) ... 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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Working workaround here, older version of setuptools must be used:
Thibauth/python-pushover#42 (comment)

pip install setuptools==57.5.0
pip install --editable .

Fajny pomysł. Ale coś mi nie chce działać

Witaj

Na Windows 10 z Python 2.7 mam tak:

Traceback (most recent call last):
  File "C:\Python27\medihunter\Scripts\medihunter-script.py", line 11, in <module>
    load_entry_point('medihunter', 'console_scripts', 'medihunter')()
  File "c:\python27\medihunter\lib\site-packages\pkg_resources\__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\python27\medihunter\lib\site-packages\pkg_resources\__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "c:\python27\medihunter\lib\site-packages\pkg_resources\__init__.py", line 2411, in load
    return self.resolve()
  File "c:\python27\medihunter\lib\site-packages\pkg_resources\__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\python27\medihunter\medihunter.py", line 42
    f'(iteration: {counter}) No results found', fg='yellow'))

Pozdrawiam serdecznie

requirements - missing lxml

Error:

# python3 ./medihunter.py my-plan
Logged in
Traceback (most recent call last):
  File "/home/jacek/opt/medihunter/./medihunter.py", line 283, in <module>
    medihunter()
  File "/home/jacek/opt/medihunter/.venv/lib/python3.10/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/jacek/opt/medihunter/.venv/lib/python3.10/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/jacek/opt/medihunter/.venv/lib/python3.10/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/jacek/opt/medihunter/.venv/lib/python3.10/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/jacek/opt/medihunter/.venv/lib/python3.10/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/jacek/opt/medihunter/./medihunter.py", line 234, in my_plan
    plan = med_session.get_plan()
  File "/home/jacek/opt/medihunter/medicover_session.py", line 356, in get_plan
    soup = BeautifulSoup(medical_services_website.content, "lxml")
  File "/home/jacek/opt/medihunter/.venv/lib/python3.10/site-packages/bs4/__init__.py", line 195, in __init__
    raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

Python version:

#python3 --version
Python 3.10.9

Packages:

pip list
Package        Version
-------------- ---------
appdirs        1.4.4
beautifulsoup4 4.6.3
certifi        2018.4.16
chardet        3.0.4
Click          7.0
fake-useragent 1.1.0
idna           2.7
jsonschema     2.6.0
notifiers      1.0.3
pip            22.3.1
python-dotenv  0.19.2
requests       2.20.1
rfc3987        1.3.8
setuptools     65.6.3
urllib3        1.23
xmpppy         0.6.2

PS.
After lxml install i get error described in #30

`JSONDecodeError: Expecting value` after some while

I got a JSONDecodeError: Expecting value error followed by a crash after some 100+ iterations. I possibly got throttled, since I set up a relative short interval. Nonetheless, it would be nice if the tool:

  1. console-printed the top n lines of the JSON it actually received
  2. sent a regular notification about the error
  3. maybe increased an interval gradually until it received a valid JSON again, instead of quitting cowardly

Traceback I got:

Traceback (most recent call last):
  File "/home/medicover/medihunter/venv/lib/python3.10/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/medicover/medihunter/venv/bin/medihunter", line 33, in <module>
    sys.exit(load_entry_point('medihunter', 'console_scripts', 'medihunter')())
  File "/home/medicover/medihunter/venv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/medicover/medihunter/venv/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/medicover/medihunter/venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/medicover/medihunter/venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/medicover/medihunter/venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/medicover/medihunter/medihunter.py", line 170, in find_appointment
    found_appointments = med_session.search_appointments(
  File "/home/medicover/medihunter/medicover_session.py", line 304, in search_appointments
    appointments = self._parse_search_results(result)
  File "/home/medicover/medihunter/medicover_session.py", line 223, in _parse_search_results
    result = result.json()
  File "/home/medicover/medihunter/venv/lib/python3.10/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Medihunter started to error: `Unsuccessful logging in`

First of all @apqlzm - thanks for great project:) I use it for long time :)

Today I noticed that medihunter stopped working for me :(

$ /usr/bin/python3 medihunter.py find-appointment -r 205 -s 27160 --user $CARD_S --password $PASS_S
Unsuccessful logging in
marcin@OpenWrt:~/medihunter-old$ 

I tried on 2 accounts both are logging same error, and it was working 3 days ago.

Same issue on second computer.

Was there a change in mediover logic / did they banned medihunter :( ?

Bot crashes if connection error

If I lock or close my laptop then medihunter might crash, because wifi turns off:

requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Is it possible to not crash and continue run requests? So I have no need to check every time is bot working or not.

"Remote end closed connection without response" exceptions

I receive this exceptions quite often, after ±300 iterations

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse
    response.begin()
  File "/usr/lib/python3.8/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 276, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 400, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3/dist-packages/six.py", line 702, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse
    response.begin()
  File "/usr/lib/python3.8/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 276, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sos/.local/bin/medihunter", line 11, in <module>
    load_entry_point('medihunter', 'console_scripts', 'medihunter')()
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/mnt/c/Users/sos/medihunter/medihunter.py", line 172, in find_appointment
    found_appointments = med_session.search_appointments(
  File "/mnt/c/Users/sos/medihunter/medicover_session.py", line 245, in search_appointments
    result = self.session.post(
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 581, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

ModuleNotFoundError: No module named 'notifiers'

Po odpaleniu komendy medihunter dostaję taki błąd:

Traceback (most recent call last):
File "/usr/local/bin/medihunter", line 11, in
load_entry_point('medihunter', 'console_scripts', 'medihunter')()
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 2793, in load_entry_point
return ep.load()
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 2411, in load
return self.resolve()
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 2417, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/Users/michal/Projekty/medihunter/medihunter.py", line 14, in
from medihunter_notifiers import pushover_notify
File "/Users/michal/Projekty/medihunter/medihunter_notifiers.py", line 1, in
from notifiers import get_notifier
ModuleNotFoundError: No module named 'notifiers'

Unsuccessful logging in

Używam:
medihunter my-plan --user moj_login --password moje_haslo
Dostaje:
Unsuccessful logging in

Jakiś pomysł czemu tak?

Invalid login/password causes "no appointments found"

I believe it should be an error.

It looks like the POST request in step 6 of the login process returns a 200 OK HTML page with just an error message somewhere in the middle. The data object is then {}, and login silently proceeds to the end. Then, when you search for appointments with SearchFreeSlotsToBook it'll return a 401/403 (can't remember) and an empty list will be returned from the whole function.

Caused me some pain (especially since you lock your account for 15 minutes every time you input your username/pass wrong 3 times) until I found out I was missing one char from the password in my script, thought it could help someone else (or this could be fixed if someone has the time) - guess it'll involve some soup work.

BTW thanks a lot for this tool 🙏 it's already very useful to me.

My Plan error

When:

$ medihunter my-plan

That:
Logged in as XXXX
Traceback (most recent call last):
File "/usr/local/bin/medihunter", line 11, in
load_entry_point('medihunter', 'console_scripts', 'medihunter')()
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/parallels/medicover/medihunter/medihunter.py", line 244, in my_plan
plan = med_session.get_plan()
File "/home/parallels/medicover/medihunter/medicover_session.py", line 345, in get_plan
drop_down_options = drop_down.find_all("option")
AttributeError: 'NoneType' object has no attribute 'find_all'

Any idea ?

setup command: use_2to3 is invalid.

Collecting python-pushover (from medihunter==0.1)
  Using cached python-pushover-0.4.tar.gz (19 kB)
  Preparing metadata (setup.py) ... 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

× Encountered error while generating package metadata.
╰─> See above for output.

Chyba to jest przyczyna:
Thibauth/python-pushover#42

Impossible to skip phone "visits"

By default medicover is returning visits over phone in search results. Would be cool to skip them as they are useless when looking for visit with required physical presence.

Docker Support

Przydałoby się dodanie wsparcia dla dockera, żeby nie trzeba było budować aplikacji na lokalnej maszynie.

My-appointments is not intuitive

My-appointments is dumping everything to file and nothing gets printed on screen. I would like to change it so it only shows future visits on screen.

Wizyty tylko z jednego dnia

Czy aplikacja zwraca tylko wizyty z jednego dnia? Oczywiście tego, który jest najbliżej daty od której się szuka?

Przykładowo jeśli pojawi się dogodny dla mnie termin na 3 stycznia, ale wciąż dostępna jest wizyta na 2 stycznia (godzina mi nie odpowiada) to aplikacja mnie o tym nie poinformuje?

Error after login

Cześć,

Pobrałem skrypt i podczas próby uruchomienia dostaję error. Czy masz może pomysł z czego wynika ten error?

Będę wdzięczny za pomoc

Dzięki!

c:\Skrypty\Medihunter>medihunter find-appointment -r Warszawa -s 3
User: ****
Password:
Logged in
Traceback (most recent call last):
File "C:\Python\Scripts\medihunter-script.py", line 11, in
load_entry_point('medihunter', 'console_scripts', 'medihunter')()
File "c:\python\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 764, in call
return self.main(*args, **kwargs)
File "c:\python\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\python\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\skrypty\medihunter\medihunter.py", line 136, in find_appointment
service=service)
File "c:\skrypty\medihunter\medicover_session.py", line 219, in search_appointments
return self._parse_search_results(result)
File "c:\skrypty\medihunter\medicover_session.py", line 151, in _parse_search_results
result = result['items']
KeyError: 'items'

Missing retry after HTTPError: 500 Server Error

I receive this error pretty often after +- 200–400 iterations:

Traceback (most recent call last):
  File "/home/sos/.local/bin/medihunter", line 11, in <module>
    load_entry_point('medihunter', 'console_scripts', 'medihunter')()
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/mnt/c/Users/sos/medihunter/medihunter.py", line 172, in find_appointment
    found_appointments = med_session.search_appointments(
  File "/mnt/c/Users/sos/medihunter/medicover_session.py", line 253, in search_appointments
    self.check_response_correctness(result)
  File "/mnt/c/Users/sos/medihunter/medicover_session.py", line 280, in check_response_correctness
    result.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://mol.medicover.pl/api/MyVisits/SearchFreeSlotsToBook?language=pl-PL

This terminate script and I need to rerun them after that

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.