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

Feedback & Feature Requests #1

Open
alfonsrv opened this issue May 17, 2021 · 101 comments
Open

Feedback & Feature Requests #1

alfonsrv opened this issue May 17, 2021 · 101 comments

Comments

@alfonsrv
Copy link
Owner

alfonsrv commented May 17, 2021

Feature Requests

To avoid cluttering the issue tracker with feature requests, please comment any requests here and we'll keep a list.

When available, I've linked a related issue or comment to add context to the request.


Emoji Feedback Scale

Emoji Feedback
🚀 Successfully booked an appointment
🎉 Successfully booked two or more appointments

Helped you? Support this project!

Buy me a Coffee

@BurgerKing2k19

This comment has been minimized.

@alfonsrv

This comment has been minimized.

@alfonsrv alfonsrv pinned this issue May 18, 2021
@MaxPoser

This comment has been minimized.

@alfonsrv

This comment has been minimized.

@AmansRevenger

This comment has been minimized.

@alfonsrv

This comment has been minimized.

@boeing747430

This comment has been minimized.

@alfonsrv

This comment has been minimized.

@boeing747430

This comment has been minimized.

@alfonsrv

This comment has been minimized.

@boeing747430

This comment has been minimized.

@AmansRevenger

This comment has been minimized.

@alfonsrv

This comment has been minimized.

@AmansRevenger

This comment has been minimized.

@alfonsrv

This comment has been minimized.

@ChrizZz90
Copy link

Brilliant bot, switched from my self developed (noob level) Selenium script to your bot. 2 topics that might be useful to add:

  1. Clear cache, maybe if shadowbanned? I don't know if this helps anything...
  2. Receive Telegram chats. With the getUpdates Telegram API you get also the chat history. In my case, I used one bot for 1 message and just grabbed the last message text. But I guess iterating through all messages would work too.

In the meantime, I booked an appointment with my self developed script, but I will recommend yours to all colleagues and friends 👍🏽

@alfonsrv
Copy link
Owner Author

Hey @ChrizZz90, thanks for the feedback – always much appreciated!

Do you think you could integrate your Telegram receive function in this project? Would be great! I think the last message should be enough, or maybe if it's filterable just the messages of the last 120s as I'm doing it with the Zulip messages. Just make a Pull request if you are so inclined. :)

Alfons

@ChrizZz90
Copy link

#Receive Chatupdates update_url = 'https://api.telegram.org/bot' + bot_token + '/getUpdates?chat_id=' + bot_chatID chat_update = requests.get(update_url) chat_json = json.loads(chat_update.text) last = len(chat_json['result']) last = last - 1 pin = chat_json['result'][last]['message']['text'] pin_input = driver.find_element_by_xpath("//input[@formcontrolname='pin']") pin_input.send_keys(pin)

I think only adding it wouldn't work. This is my script for adding the SMS Pin. But you need to know to write only the PIN. Maybe working with a one time code would work? Or just if Telegram enabled select the first appointment and book it automated.

@alfonsrv
Copy link
Owner Author

Alright. Wanted to avoid downloading this app; but added full Telegram support 👍
Your code snippet was very helpful, thanks!

@starykov
Copy link

Hi, very useful app.
A couple of feature requests:

  1. Flag to skip to the next location if landed into the waiting room.
  2. Kind of best practices to avoid the 429 error: does the order of servers play any role, what is the minimal request interval and so on. What I checked up to now: with single browser window 1 minute WAIT_LOCATIONS is too low, 2 minutes seem ok.

@alfonsrv
Copy link
Owner Author

Hey @starykov thanks for your feature requests. While I understand how such a setting could seem beneficial first glance, it will actually likely result in more shadow bans, which is why I left it out. The settings.sample.py is pre-configured of what I believe is a best-practice configuration for most people. If you feel otherwise you could e.g. start an Issue discussing such configuration.

@Maik7
Copy link

Maik7 commented May 25, 2021

Hi,
thanks for your work.
Regarding Telegram support: you should add a
if not _message is None:
in alert.py line 115; not all telegram results contain a message

@alfonsrv
Copy link
Owner Author

@Maik7 thanks for the pointer. Don't really use Telegram as mentioned – only happens when you didn't text your bot before I assume?

@Maik7

This comment has been minimized.

@ChrizZz90
Copy link

@alfonsrv I had the situation tonight that the bot found available appointments but without my feedback, it exited. Is it possible to book the appointment in any case or a fallback if feedback is missing? Maybe as a settings configuration? (Maybe something like this is already implemented. In my case, my script booked the slot during the waiting time of the bot).

Seems like that also during the night (and in the potential sleep period) appointments are available.

Also, I want to share my delete cache code. I don't know if it helps, but it might be usable.

def delete_cache():
    driver.execute_script("window.open('');")
    sleep(2)
    driver.switch_to.window(driver.window_handles[-1])
    sleep(2)
    driver.get('chrome://settings/clearBrowserData') # for old chromedriver versions use cleardriverData
    sleep(2)
    actions = ActionChains(driver) 
    actions.send_keys(Keys.TAB * 3 + Keys.DOWN * 3) # send right combination
    actions.perform()
    sleep(2)
    actions = ActionChains(driver) 
    actions.send_keys(Keys.TAB * 4 + Keys.ENTER) # confirm
    actions.perform()
    sleep(5) # wait some time to finish
    driver.quit() # close this tab
    driver.switch_to.window(driver.window_handles[0]) # switch back

@alfonsrv
Copy link
Owner Author

@Maik7 thanks!
@ChrizZz90 although technically possible, booking appointments automatically is not in the spirit. Human interaction should always be required to avoid appointments being booked accidentally e.g. the next day at 8am and the user not knowing about it, resulting in appointments not being attended.

Cache cleaning function is interesting – not sure where we could use it though.

@ChrizZz90
Copy link

I used cache cleaning first after opening a browser window every time, on a later stage I reduced it and I call it if I am shadowbanned.

Appointments are scheduled at least 24h before, every appointment later is directly handed to the center itself and they use people on their waiting list. This is probably a human process with issues and mistakes, but I can confirm that it never happened to get an appointment in less then 24 hours. Do you have other experiences?

@alfonsrv
Copy link
Owner Author

alfonsrv commented May 25, 2021

Hey @ChrizZz90, that's not true – appointments can also appear the day before, with the appointment being literally the next morning. Had it happen to me too; got one on Sunday for Monday at 0830.

Interesting. Did cache clearing have a positive impact? I honestly think cookies need to have a certain age for everything to work better, but may be a wrong feeling. Instead we could also use incognito sessions.

@ChrizZz90
Copy link

Wow, damn, I thought they would stick to their rules.

I don't know if it has an impact. Tests are influenced by the waiting list and other scripts I am running. Clearing the cache just gives me a positive feeling that I did everything to solve it.

@mbhochstetter

This comment has been minimized.

@PadPlay

This comment has been minimized.

@Maik7

This comment has been minimized.

@db314159265

This comment has been minimized.

@grumpyp

This comment has been minimized.

@EricDuminil

This comment has been minimized.

@grumpyp

This comment has been minimized.

@EricDuminil

This comment has been minimized.

@ghost

This comment has been minimized.

@alfonsrv
Copy link
Owner Author

alfonsrv commented Jun 8, 2021

Das hier ist Feedback & Feature Requests. Alle, die nicht aus eigenem Antrieb die Einstellungen ändern bzw. ausprobieren können hier entlang: Comprehensive Guide to Getting Appointments for Dummies

@n14s

This comment has been minimized.

@alfonsrv

This comment has been minimized.

@klaus-vb
Copy link

klaus-vb commented Jun 8, 2021

Successfully got an appointment (semi-automatic mode without chat client integration) after a bit over 1.5 days (really a life saver!).

Appears that getting Vermittlungscodes is limited to 3 per server. Got 2 successfully a day ago and after requesting another one last night it refused all further requests with API: Error from backend: [-1] Maximum requests reached for phone number and email. Which should be better phrased "or", because changing email didn't help. Couldn't try with different phone number in the middle of the night. Sorry, didn't mean to spread rumors about limits which aren't true. Yesterday it really looked this way, Today I could get more Vermittlungscodes without trouble. So it just needs patience, even if the error message sounds like a certain phone number and email address reached a permanent limit.

@philipphu
Copy link

philipphu commented Jun 8, 2021

Appears that getting Vermittlungscodes is limited to 3 per server. Got 2 successfully a day ago and after requesting another one last night it refused all further requests with API: Error from backend: [-1] Maximum requests reached for phone number and email. Which should be better phrased "or", because changing email didn't help. Couldn't try with different phone number in the middle of the night.

Not sure about that limit. I have way more than 3 codes on the same email & phone number & server combination. Although I was mostly active until a couple weeks ago. I did sometimes receive errors when trying to get codes with the same mail & phone combination too fast. But it definitely was not after 2 codes and after a little bit of "cool down" or switching the phone number it wasn't a problem anymore.

@janosh
Copy link

janosh commented Jun 9, 2021

@alfonsrv Great tool! Thanks for taking the time to create impf-botpy. You may want to use argparse's version action instead of rolling your own.

if args.version: print_version(); exit()

@michael-uhl
Copy link

Succesfully booked.

@d-t-o
Copy link

d-t-o commented Jun 13, 2021

🚀

some modifications I made though (too hacky for a MR but very simple nevertheless):

  • if only one appointment slot is offered, don't ask the user which one he wants, just book it immediately
  • next to some sms backends, also support reading the code from the terminal window. typing a 1 on my keyboard is way faster than typing appt:1 on my phone

great app though, never would have gotten my appointment without it. still baffling as to why the oss community has to come up with an outfoxed polling solution instead of someone just creating a good old waiting list...

@jaytxrx
Copy link

jaytxrx commented Jun 13, 2021

I am using Ubuntu. When I enable CONCURRENT_ENABLED = True, I get the below error and the chrome is having address as data:, (see the screenshot - just added incase if it helps you to debug the issue)

This is the error
selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist

This is the chrome address bar
Screenshot_20210614_010633

@EricDuminil
Copy link

@d-t-o I've done the same modification. Be aware, though: my bot answered too fast with "appt:1", and I only got 429 from the server, even after adding sleep(15). It was too late to manually book the appointment, then.
It would be nice if the bot automatically picked the first appointment, and filled everything in the online form, without clicking on "Confirm". The user could check everything's fine, and then confirm, not too fast and not too slow. :D
Could it be that the server can somehow tell the difference between booking via the online interface and via impfbot-py?

@btbest
Copy link

btbest commented Jun 14, 2021

Yay, thank you so much for creating this neat little bot ^_^

My setup: Old laptop revived with Ubuntu 18.04; 2GB RAM
My need: Vermittlungscodes and appointment; two vaccination centres within reach
My experience:
First attempt crashed with "missing module dataclasses". Fixed by installing the dataclasses module, maybe just add that one to requirements.txt.
Next I set up the Telegram hook, which worked like a charm, thanks to the clear tutorial.
Ran main.py --code first, each time only storing one of the two locations in settings.py. Received codes without any issue. Manually trying out the codes first led to an unspecified error on the website. This seems to have been a serverside problem though, disappeared a couple of hours later. Then ran main.py with both locations and CONCURRENT_ENABLED=True and CONCURRENT_WORKERS=2. I had WAIT_RESCAN_APPOINTMENTS=60*4 because I feel checking every 2min is excessive (and if all of us did it, the server would overload even quicker than it already does).
From then it was just waiting.
The bot needed manual help twice. One or both concurrent workers lost touch with their Chromium session, and the automatic reset didn't reestablish it. Manually closing the browser was enough to fix it though, the bot restarted the browser on its next loop and continued working fine. Maybe the log below is helpful in some way.
Got a ping on telegram at 7.50am two days later, browser window left open for me with 7min remaining to book my appointment. Win :D

Log from the bot's random desynching:

2021-06-09 18:40:28,802 - [INFO] <impf.browser.browser.py:520>  69123: Rechecking for new appointments
2021-06-09 18:40:28,845 - [ERROR] <impf.browser.decorators.py:73>  69123: AssertionError occurred in <control_appointment>. This usually happens if your computer/internet connection is slow or if the ImpfterminService site changed.
2021-06-09 18:40:28,845 - [ERROR] <impf.browser.decorators.py:75>  69123: Sleeping for 120s before continuing, giving the user the ability to interact before attempting to revover automatically...
2021-06-09 18:42:28,969 - [INFO] <impf.browser.browser.py:539>  69123: Current page title is "<selenium.webdriver.remote.webelement.WebElement (session="e52b61dc[more digits]21351968f", element="12990296-d4f9-4a90-a048-c962f66854c6")>"
2021-06-09 18:42:29,054 - [INFO] <impf.browser.browser.py:559>  69123: Continuing with reset via <control_main>
2021-06-09 18:42:36,522 - [INFO] <impf.browser.browser.py:459>  69123: Connected to server [002]
2021-06-09 18:42:36,639 - [ERROR] <impf.browser.decorators.py:73>  69123: AssertionError occurred in <control_main>. This usually happens if your computer/internet connection is slow or if the ImpfterminService site changed.
2021-06-09 18:42:36,639 - [ERROR] <impf.browser.decorators.py:75>  69123: Sleeping for 120s before continuing, giving the user the ability to interact before attempting to revover automatically...

@ievgent
Copy link

ievgent commented Jun 15, 2021

Today I have successfully booked two appointments.
One thread with only one test center.

@BeckerFelix
Copy link

Can someone confirm the docker wrapper version is recently functional? I am trying to get an appointment / code on 4 centers since two days to no avail at all. Also, could you please add more detail to
I highly recommend helping the bot getting to the appointment booking screen manually in main/docs/DOCKER.md as I don't fully get what is meant by that. Visually everything looks good on VNC, the bot is clicking the correct buttons etc. Still I guess I might miss something.

@agent0711
Copy link

Very nice, could get an appointment at Robert Bosch Krankenhaus after a few hours.
The first one was already taken after I entered my personal data manually (guess I was too slow).
Getting the Vermittlungscodes was much faster than the actual appointment.
There was error 429 occasionally but after waiting a while it worked again.
I used 2 concurrent threads on a windows PC (not using the remote function).

@alfonsrv
Copy link
Owner Author

@janosh – guess there's always something you don't know about in Python, heh. Thanks for the pointer.

@sicherist
Copy link

sicherist commented Jun 21, 2021

Not exactly a bug, but one thing I noticed: Don't use custom city-names in settings.py after the ZIP-code. For example I wrote "70376 Robert-Bosch". This led to impfbot skipping this Impfzentrum altogether.

2021-06-21 07:15:26,350 - [INFO] <impf.browser.browser.py:174> 70376: Navigating to ImpfterminService
2021-06-21 07:15:28,532 - [INFO] <impf.browser.browser.py:187> 70376: Selected Bundesland: Baden-Württemberg
2021-06-21 07:15:38,738 - [INFO] <__main__.main.py:108> Waiting until 07:20:38 before checking the next location

As soon as I renamed it to 70376 Stuttgart, it worked.

@sicherist
Copy link

sicherist commented Jun 22, 2021

Could you add a timestamp to chat messages? Android Zulip App doesn't show a timestamp when a chat message from a bot was received.
For example
ALERT_AVAILABLE: str = '{{ DATUM-UHRZEIT }} Impftermine verfügbar in {{ LOCATION }}! Reserviert für die nächsten 10 Minuten... Buchungslink: {{ LINK }}'
(Sorry I have no Idea how to code.)

Repository owner deleted a comment from technosoft-admin Jan 28, 2024
Repository owner locked and limited conversation to collaborators Jan 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests