Giter Club home page Giter Club logo

impfbot's Issues

REST documentation

Is there a public documentation of the Impfportal-API? I was not able to find it.

Error 'Could not send Email' during validation [gmail.com]

### I am getting following error when i ran windows_validate.bat

D:\impfbot-main\impfbot-main>py -3 -m pip install -q -r requirements.txt
WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider upgrading via the 'C:\Program Files\Python39\python.exe -m pip install --upgrade pip' command.

D:\impfbot-main\impfbot-main>py -3 src/validate_config.py
2021-06-07 14:13:41 [INFO] validate config.ini
2021-06-07 14:13:41 [INFO] settings validation finished
Do you want to send a test message? yes/no
y
2021-06-07 14:13:42 [INFO] [EMAIL] try to send e-mail
2021-06-07 14:13:42 [ERROR] Couldn't send mail: [Errno 11001] getaddrinfo failed
2021-06-07 14:13:42 [INFO] [TELEGRAM] send_telegram_msg is not set to true skipping
2021-06-07 14:13:42 [INFO] [WEBBROWSER] try to open browser
2021-06-07 14:13:42 [INFO] [WEBBROWSER] open browser was successful
2021-06-07 14:13:42 [INFO] Finished: Sending test massages
2021-06-07 14:13:42 [INFO] finished validation script

### Input in config:

[EMAIL]
; true wenn eine Benachrichtigung via Mail gesendet werden soll sonst false
enable=true
; Absender Adresse
sender=[email protected]
; Login Passwort
password=xxxxxx
; smtp Server
server=smpt.gmail.com
; smtp Port - derzeit kann nur an SSL Server gesendet werden
port=465
; E-Mail Empfaenger Liste
empfaenger=[email protected],[email protected]

Feedback & Support

Hier ist der passene Ort für Feedback und Fragen für die es sich nicht lohnt ein Issue zu eröffnen.

Irgendwie hat sich hier als Dokumentatiossprache Angelsächsisch eingebürgert 🙃. Aber keine Angst, ich beantworte auch Fragen auf Deutsch 😄. Wäre nur cool wenn die sonstigen Issues einheitlich Englisch bleiben.

Telegram Notification is(maybe) Broken

I got the console news:
2021-06-02 17:29:03 [INFO] Free slot! (2406) Moderna/mRNA
2021-06-02 17:29:03 [ERROR] Couldn't send Telegram message: Chat not found
Sleeping (898s/900s)

Very nice was the new open window! So I just had to click go.

Have a look at my config:

[TELEGRAM]
; true, wenn Telegram verwendet werden soll; sonst false
enable_telegram=true
; Token muss zunächst generiert werden: https://t.me/BotFather
token=187726359*********************************
; User-ID des Empfängers: https://t.me/userinfobot
chat_id=https://t.me/************

Config creation interface if no config is provided

A guided config setup via cli or even better gui, would great for inexperienced users.

Features

  • generating config file
  • easy to use & understand
  • step by step
  • integrated check (no validation script needed afterwards)

lower() for checks against YES/NO lists

While looking for a fix for #90 I found another issue:

the user input is taken as is and checked against YES and NO, we should lower() it first to allow for "Ja", "Yes", "No", and so on

Document new config structure in README.md

This is also required for v3.0.0!

We should update README.md to explain the (new) config structure and options.

TODO:

  • Update README.md
  • Create separate README in English
  • move Contributing section to separate file CONTRIBUTING.md

succsessfull?

Where can i see that the bot is running successfully?
there is only "sleeping [time]"
thank you

Vector vaccine for under 60s

image

You can book appointments for vector vaccine while under 60.
This option could be added to the bot as a config-entry in the [COMMON]-Area. :)

Password: "%" needs to be escaped

Thanks for the amazing work! Finally I don't have to check all the time the Impfportal.

One suggustion: A SMTP password containing will lead to an exception. You need to escape it by writing "%%" for one "%" in password. Maybe something to mention in the comment of config.ini.example?

Telegram group IDs stopped working in 3.0 or logging problem

In version 2.0, I used group IDs to send messages directly to Telegram groups. The group IDs have a minus sign. A description, how to find the group ID is given here.

As soon as I add a group ID to my chat_ids, the logs on start show chat_ids: not set. I couldn't validate if the IDs are still used (see here.

In the logs, the entries of the Email/receivers list are not separated by any character. The same is true for the chat_ids.

Docker send test

Hi,
it is possible to send a telegram test message?
or an email test message?
i installed it in a docker container

Auto booking enhancement

Good day,

Is it possible to add auto booking code which only requires you to add the code you receive via mobile when promted? Even after reacting immediatley to the notification an appointment is available, it took me ~30 seconds to get to the booking page but not dates are clickable, see image.

image

You need some kind of super human speed to pull this off.

Please let me know if this possible.

Kinf regards

raspberry pi

under raspberry pi4 i get the following errors by starting linux_validate.sh:
File "src/validate_config.py", line 3, in from alerts import alert
File "/usr/lib/impfbot-main/src/alerts.py", line 4, in from telegram.ext import Updater
File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/init.py", line 21, in from .basepersistence import BasePersistence
File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/basepersistence.py", line 25, in from telegram import Bot
ImportError: cannot import name 'Bot' from 'telegram' (/home/pi/.local/lib/python3.7/site-packages/telegram/init.py)

Add tests

Unittesting for methods in src (exc. validate_config.py, log.py)

  • alerts.py
  • api_wrapper.py
  • common.py
  • impfbot.py

add admin mail notifications

Another feature that I would like to see, is a notification mail in case there is an IP ban. There should be an option to send this mail to a different set of addresses to avoid spamming the group.

Originally posted by @DennisWilken in #5 (comment)

Running on server causes crash at import of configurator gui

I am running the application on a server. When running version 3.0.0 it does crash when starting.
Stacktrace:

File "/mnt/user/opensoftware/impfbot/src/config_generator.py", line 2, in <module>
    import tkinter as tk
  File "/usr/lib64/python3.9/tkinter/__init__.py", line 37, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk

An easy fix is by only import the config generator and thereby tkinter, when needed.

docker composes creates config.ini as folder

If you want to use the docker-compose file you need to make sure that the config.ini file already exists. Otherwise, docker will create a folder with the name config.ini that I couldn't delete while docker was running. Maybe you could add a comment to the compose file? Took me some time to solve this problem.

Do I have to restart my docker container after adding new users to the config.ini or the config.ini read automatically?

Android App

@sibalzer
Based on your project I took major inspiration and built an app for android, which will get its first release version around this week.
To honor my predecessor I would like you to add something to the readme, so you're listed as a contributer, if you want.

Disclaimer to use waiting list in addition to the bot

As is said in the README, once you have the nofitication, you have to be fast. With that, one also needs to be lucky. Maybe we should add a disclaimer that the bot alone isn't guaranteed to get the user an appointment.

Sending email from Web.de failed

Using smtp.web.de and port 587 resulted in

[ERROR] Couldn't send mail: SMTP AUTH extension not supported by server.

When the following is added to alert.py:
import smtplib, ssl
and

def send_mail(msg: str) -> None:
 ...
    else:
        with smtplib.SMTP(settings.SERVER, settings.PORT)as smtp:
            smtp.starttls(context=ssl.create_default_context())
            smtp.login(settings.SENDER, settings.PASSWORD)
            smtp.send_message(mail)

it's working.

Config properties in the example do not match requirements in Docker-Compose

I copied and modified the provided config.example.ini but the log of docker-compose tells me that fields are missing that are in the config with either slightly different name or in a different language.

He wants geburtstag but the config says birthdate (same for zipcode).

He wants enable_telegram but the config only has enable under [TELEGRAM]

Automatisierte Impfterminbuchung

Hallo, erst mal vielen Dank für dieses tolles Projekt. Jetzt meine Frage, AFAIK kann vaccipy automatisch buchen, wäre so was in Niedersachsen möglich?, hast du schon Erfahrungen gesammelt?, was wäre deine Einschätzung, wie viel Zeit würde man für dieses feature benötigen? Danke im Voraus.

Printing of settings with a list value misses a delimiter

When printing the settings, every list value is just a concatenated string of the list entries, without any delimiter.

Please replace this part of the code within settings.py with a simple join...

                if isinstance(value, list):
                    value = ', '.join(value)
#                    list_str = ""
#                    for entry in value:
#                        list_str += str(entry)
#                    value = list_str

The line behind the "isinstance" is the new one. Old lines which should be deleted are commented out.

Validation code fails with --alert argument only

I updated to v3.0 and have troubles running the validation script. I am using a docker container executing docker exec impfbot python src/validate_config.py -a

and get the following output:

2021-06-08 22:04:19 [INFO] validate config.ini
2021-06-08 22:04:19 [INFO] [WEBBROWSER] 'enable' is set to 'false'. Disable [WEBBROWSER]
2021-06-08 22:04:19 [INFO] [APPRISE] 'enable' is set to 'false'. Disable [APPRISE]
Traceback (most recent call last):
File "//src/validate_config.py", line 33, in <module>
2021-06-08 22:04:19 [INFO] settings validation finished
if result in YES or arg['alert']:
NameError: name 'result' is not defined

If the alert argument is used, the code does not ask for input and the result variable is not defined.

Optimize interval timings

Example for Contribution:

No Shadowban after 2 Days:

Settings

  • sleep_between_requests_in_s=300
  • sleep_between_failed_requests_in_s=30
  • sleep_after_ipban_in_min=180
  • jitter=15

Add please a Test for Groups

There is no proof, but it looks like sometime are slot ONLY for groups.
Is there a way to check also for this?

add custom prefix for alert messages

We could add some custom prefix (in config) to the message eg:
[My Group bot for 49123] Freier Impfslot (11)! AstraZeneca/Vector

Dunno where to put in the config. [ADVANCED] custom_message_prefix maybe?

Originally posted by @sibalzer in #5 (comment)

Connection Check

A Test i would also add, if possible,
Check if the Bot reaches the website.
Sometype of status check.
I have lost the connection with internet, but the bot keep on running with no feedback

Release v3.0.0

I think the beta-branch is ready for v3.0.0.

Doing some final manual testing rn 🚀

Suggestion

I suggest an option to test the notification methods one time. I did that manually by copying "alerts.alert("bla")" after "else" to verify everything is working (it is, which gorgeous!).

Docker image for Raspberry Pi (arm64) missing

Hello,

I was just about to set up the project on my Raspberry Pi, but found that the image is only provided for the amd64 architecture:

pixiono@pi:~/impfbot/docker$ docker image inspect ghcr.io/sibalzer/impfbot:latest | grep "amd" "Architecture": "amd64",

Since I believe that this application scenario could easily be made possible I have prepared a PR: #76

I used this to enable a multi-arch build: https://github.com/docker/build-push-action

Since I have never worked with GitHub workflows before, I can't verify if this works.

Running on android (termux)

It's just a hint, that might be added to README: it's surprisingly easy to run the bot on android smartphones.

All you need is termux (https://termux.com/), install python and maybe openssh to copy files and test everything from pc. Works for me without trouble, but maybe energy saving will make some in the future, I will see.

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.