Automated appointment monitoring system for embassy appointment booking. Continuously checks for available appointment slots and sends notifications via Telegram.
- π€ Automated Monitoring: Checks Hungary (Subotica/Belgrade) and Italy embassy appointments
- π± Telegram Notifications: Instant alerts when slots are found
- π VPN Integration: Built-in WireGuard VPN rotation with IP blocking detection
- π³ Docker Support: Easy deployment with Docker Compose
- πΎ Database Logging: PostgreSQL database for tracking blocked IPs and slot statistics
- π Run Statistics: Track every run with detailed outcomes and success rates
- β° Cron Scheduling: Runs automatically every 10 minutes
- πΈ Screenshot Capture: Saves screenshots and HTML when slots are found
- βΈοΈ Smart Cooldown: Automatically pauses after captcha detection
- Python 3.11+ (if running without Docker)
- Docker and Docker Compose (recommended)
- PostgreSQL 14+ (for database logging)
- WireGuard VPN configured (optional, but recommended)
- Telegram Bot Token and User ID
See DATABASE_INSTALL.md for complete instructions.
Quick version:
sudo apt install postgresql postgresql-contrib -y
sudo -u postgres psql << EOF
CREATE USER embassy_user WITH PASSWORD 'embassy_pass';
CREATE DATABASE embassy_eye;
GRANT ALL PRIVILEGES ON DATABASE embassy_eye TO embassy_user;
\c embassy_eye
GRANT ALL ON SCHEMA public TO embassy_user;
EOF
echo "host all all 127.0.0.1/32 md5" | sudo tee -a /etc/postgresql/*/main/pg_hba.conf
sudo systemctl restart postgresqlgit clone <repository-url>
cd embassy-eye
# Setup environment
cp env.example .env
nano .env # Add your credentials
# Install dependencies and initialize database
pip install -r requirements.txt
python scripts/init_database.py# Build images
./build_docker.sh
# Test run (Hungary - both locations)
./run_script.sh
# Setup cron for every 10 minutes
crontab -e
# Add: */10 * * * * /root/embassy-eye/run_script.sh >> /root/embassy-eye/cron.log 2>&1embassy-eye/
βββ embassy_eye/
β βββ automation/ # Web automation utilities
β βββ database/ # PostgreSQL models and operations
β βββ notifications/ # Telegram notifications
β βββ runner/ # Main execution logic
β βββ scrapers/
β βββ hungary/ # Hungary embassy scraper (Subotica & Belgrade)
β βββ italy/ # Italy embassy scraper
βββ scripts/ # Utility scripts
βββ run_script.sh # Main wrapper with VPN management
βββ .env # Configuration (not in git)
βββ DATABASE_INSTALL.md # Database setup guide
Edit .env file:
# Telegram (Required)
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_USER_ID=your_user_id_here
HEALTHCHECK_BOT_TOKEN=your_healthcheck_bot_here # Optional
# Database (Required)
DATABASE_URL=postgresql://embassy_user:embassy_pass@localhost:5432/embassy_eye
DB_ECHO=false
# Italy credentials (if using Italy scraper)
ITALY_EMAIL=your_email@example.com
ITALY_PASSWORD=your_passwordGetting Telegram credentials:
- Bot Token: Create bot with @BotFather
- User ID: Get from @userinfobot
The run_script.sh automatically manages VPN connections using WireGuard.
Available VPN locations (edit run_script.sh to customize):
- Albania, Bosnia, Bulgaria, Croatia, Cyprus, Georgia
- Greece, Hungary, Moldova, Montenegro, North Macedonia
- Poland, Romania, Serbia, Slovakia, Slovenia, Turkey
Setup passwordless sudo for cron:
sudo visudo
# Add: youruser ALL=(ALL) NOPASSWD: /usr/bin/wg-quick# With VPN rotation and Docker
./run_script.sh
# Docker only (no VPN)
docker-compose run --rm embassy-eye python fill_form.py hungary both
# Python directly
python fill_form.py hungary bothRun every 10 minutes:
crontab -eAdd:
*/10 * * * * /root/embassy-eye/run_script.sh >> /root/embassy-eye/cron.log 2>&1Other schedules:
*/5 * * * *- Every 5 minutes*/15 * * * *- Every 15 minutes0 * * * *- Every hour
The system automatically tracks:
Every time a VPN IP is blocked:
- IP address, country, embassy, timestamp
Every time slots are found:
- Embassy, location, service, timestamp, notes
Query examples:
# Recent blocked IPs
psql -h localhost -U embassy_user -d embassy_eye -c \
"SELECT * FROM blocked_vpns ORDER BY blocked_at DESC LIMIT 10;"
# Recent slots found
psql -h localhost -U embassy_user -d embassy_eye -c \
"SELECT * FROM slot_statistics ORDER BY detected_at DESC LIMIT 10;"
# Blocked IPs by country
psql -h localhost -U embassy_user -d embassy_eye -c \
"SELECT country, COUNT(*) FROM blocked_vpns GROUP BY country ORDER BY COUNT(*) DESC;"- Connects via random VPN
- Checks if IP is in blocked list
- Fills booking form for Subotica and/or Belgrade
- Detects available slots or blocks
- Sends Telegram notification if slots found
- Logs to database
- If IP blocked: rotates VPN and retries (up to 3 times)
- Uses real Chrome with CDP (Chrome DevTools Protocol)
- Handles reCAPTCHA Enterprise
- Checks multiple booking services
- Detects "no slots" modals
- Account rotation to avoid blocks
- Sends notification with service details
See scraper-specific docs:
View detailed run statistics to analyze success rates and system behavior:
# View detailed statistics for last 7 days
python scripts/view_run_statistics.py --detailed
# View last 30 days
python scripts/view_run_statistics.py --detailed --days 30
# View specific location
python scripts/view_run_statistics.py --detailed --location subotica
# View recent runs
python scripts/view_run_statistics.py --recent --limit 50The system tracks every run with outcomes:
- β Slots Found: slots_found, slots_found_captcha, slots_found_email_verification
- β No Slots (Modal): no_slots_modal - reliable "no slots" indicator
- π« IP Blocked: ip_blocked - triggers VPN rotation
β οΈ No Slots (Other): no_slots_other - ambiguous cases
See STATISTICS.md for complete documentation on viewing and analyzing statistics.
# Cron logs
tail -f /root/embassy-eye/cron.log
# Docker logs
docker logs -f embassy-eye
# Database connection
python scripts/init_database.py- VPN fails: Check passwordless sudo setup
- Database errors: Verify PostgreSQL is running and DATABASE_URL is correct
- No notifications: Check Telegram credentials in .env
- IP keeps getting blocked: Script will rotate through VPN locations automatically
Update and rebuild:
cd /root/embassy-eye
git pull --rebase
./build_docker.sh
docker-compose up --build --remove-orphans -d- Keep
.envfile secure:chmod 600 .env - Don't commit
.envto version control - Use strong database passwords
- Limit PostgreSQL network access
- Run as non-root user when possible
See LICENSE file.
This tool is for educational and personal use only. Use responsibly and in accordance with embassy terms of service. The authors are not responsible for any misuse.