PythonPython
No Screenshots Uploaded Yet
COMPLETED

Italy Visa Appointment Bot

Automate the process of booking an Italy visa appointment using Selenium WebDriver in Python. This project handles login, form filling, consent agreement, OTP entry, image upload, appointment slot sel

About the Project

Automate the process of booking an Italy visa appointment using Selenium WebDriver in Python. This project handles login, form filling, consent agreement, OTP entry, image upload, appointment slot selection, and retries in case of failures such as CAPTCHAs or pending appointments.


Features

  • Automated login to Italy visa appointment portal.
  • Fill and submit appointment form using user data from Excel.
  • Handle CAPTCHA challenges with manual or automated solving.
  • CAPTCHA failsafe with retry logic and password re-entry on failure.
  • Detect and handle appointment pending status gracefully.
  • Agree to terms via modal interactions with retries.
  • Manual OTP input prompt and automated OTP form filling.
  • Upload required photo with modal confirmation handling.
  • Select appointment date and available time slot.
  • Retry mechanism for form submission failures or alerts.
  • Detailed console logging for every step.
  • Graceful handling of unexpected alerts and errors.

Prerequisites

  • Python 3.7+
  • Google Chrome browser (or modify for other browsers)
  • ChromeDriver compatible with your Chrome version (in PATH or specify path)
  • Teserract: https://github.com/tesseract-ocr/tesseract/releases/download/5.5.0/tesseract-ocr-w64-setup-5.5.0.20241111.exe
  • Required Python packages:
pip install selenium openpyxl
  • data.xlsx file with user data in the root directory.
  • image.jpg file (photo to upload) in the root directory.

Project Structure

  • bot.py — Main automation script.
  • data.xlsx — Excel file with user data like email and password.
  • image.jpg — Photo file to upload during appointment.
  • Additional helper modules/functions as needed (e.g., for CAPTCHA handling).

Usage

  1. Prepare your data Fill in your credentials and appointment details inside data.xlsx.

  2. Place your photo Add the required image file named image.jpg in the project directory.

  3. Run the script

python bot.py
  1. Manual OTP Input When prompted, enter the OTP sent to your email.

  2. Follow console logs The script will print status updates, errors, and prompts.

  3. Completion After successful booking or failures, the script waits for you to press Enter before closing the browser.


Important Notes

  • OTP Handling Currently requires manual OTP entry. Automating OTP retrieval can be integrated as an enhancement.

  • CAPTCHA The script uses solve_captcha_failsafe() which attempts to solve CAPTCHA multiple times and checks if it succeeded. If the CAPTCHA fails and the password field is still visible, it will re-enter the password and retry solving. You can extend this to integrate an external CAPTCHA solver like 2Captcha.

  • Retries The script retries submission when failures occur, but you may want to set max retry limits depending on your use case.

  • Browser Driver Ensure ChromeDriver is installed and matches your Chrome browser version. Adjust setup_driver() function if you use other browsers.


Example User Data (data.xlsx)

| email | password | other_fields... | | ------------------------------------------- | ----------- | ---------------- | | user@example.com | yourPass123 | ... |


How It Works (Summary)

  • Login with user credentials.
  • Fill appointment form with user data.
  • Submit form and select appointment slot.
  • Handle consent modal or appointment pending page.
  • Input OTP manually and complete form filling.
  • Upload photo with modal confirmation.
  • Retry on errors like CAPTCHA, alerts, or "Try Again" prompts.
  • Log each step’s success or failure in console.

Troubleshooting

  • If elements are not found, check if the website layout has changed.
  • Make sure your ChromeDriver and browser versions are compatible.
  • If CAPTCHA solving fails, you might need to handle it manually or update solver logic.
  • Ensure your internet connection is stable during the automation.
  • Review console logs for detailed error messages.

License

This project is provided as-is without any warranty. Use it responsibly and comply with the Italy visa appointment site’s terms of service.

Project Timeline

Jun 2025 - Aug 2025

Technologies

Python

External Links

Related Projects

Projects built with similar technologies.

Online Html Editor And Viewer
COMPLETED
JavaScriptHTMLCSS+1 more

Online Html Editor And Viewer

The Online HTML Editor and Viewer is a simple web application built with Flask that allows users to write and preview HTML code in real-time.

Rasikh Ali
Qrgen
COMPLETED
Jupyter NotebookHTMLPython

Qrgen

A premium, feature-rich QR Code Generator engineered with Python (Flask) and a pristine Glassmorphism frontend.

Rasikh Ali
Examina Ai
COMPLETED
TypeScriptPythonCSS+2 more

Examina Ai

Using AI, It transforms raw study materials into structured, verified examination sets with support for institutional export formats like Moodle XML.

Rasikh Ali