Code is for personal, non-commercial use only
Disclaimer: This code is meant to facilitate scheduling meetings for the US embassy in Israel. It is not meant for abusing the appointment booking system. Please notice that you may get blocked for misusing the system. I take no responsibility for that.
Check and schedule visa appointments in the israeli embassy site
- Docker
- Cron (to schedule)
For local dev & testing:
- Python >= 3.10 with Virtualenv
- Firefox
docker build -t usvisa-il-app .
Copy the sample configuration:
cp example.env .env
Inside the new .env
file:
- Set your embassy username & password (
visa_creds_username
,visa_creds_password
) - Set your current appointment date (
current_appointment_year
,current_appointment_month
,current_appointment_day
) - If you have a telegram bot, set the token and chat_id (
telegram_token
,telegram_chat_id
)
Inside the main project directory:
docker run --env-file .env -v $PWD:/shared/ --rm usvisa-il-app
As part of a cron:
crontab -e
PATH=/usr/local/bin/:$PATH
0,10,15,30,45 7-12 * * 0-5 cd /<PATH_TO>/usvisa-il-app && docker run --env-file .env -v $PWD:/shared/ --rm usvisa-il-app >> usvisa.log 2>&1
note: 1st row is where to add the docker installation location to your path. This might look different depending on your OS (the example will work in linux/mac)
If a Telegram token is set in the configuration you'll receive Telegram alerts when a new appointment is scheduled.
Once a new appointment was set, a screenshot appointment_screenshot.png
will be saved into the project's main directory, and a file new_appointment.txt
will be saved with the appointment details
When the scheduler finds an appointment, it schedules it and creates a file new_appointment.txt
with the details. This is to prevent from scheduling a new, later appointment if running afterwards (since the configuration is still set with the older appointment).
To keep rescheduling, alter the current appointment details in the configuration with the details of the new appointment, and delete new_appointment.txt
For easier testing and development cycles (no need to build a docker image) use the same main file, but set the environment variable app_os to macos
(currently only macOS supported):
# set up the environment
virtualenv -p python3 venv
source ./venv/bin/activate
# source ./venv/bin/activate.fish for fish CLI users
pip install -r requirements.txt
# run:
app_osx="macos" python ./src/main.py
When an error occurs while running inside a Docker container, a screenshot is saved to allow for debugging.
- Extract current appointment data into a file to parse and update once new meeting is set
- Support choosing between TLV or Jerusalem
Avi Friedman. Buy me a beer!
Licensed under the MIT license (see: license)