Vehicle Info & Challan Scraper is a Flask-based web application that retrieves detailed vehicle registration (RC) data and pending traffic fines (specifically for Karnataka State). It features AI-powered License Plate Recognition using Google Gemini to extract numbers from images and uses Selenium for automated data scraping.
A powerful web application built with Flask, Selenium, and Google Gemini AI. This tool allows users to input a vehicle registration number (manually or via image upload) to scrape detailed ownership information and check for pending traffic violations (Challans).
Note: The challan retrieval module is currently configured for the Karnataka State Police (KSP) system.
- 📸 AI-Powered OCR: Upload an image of a car/bike, and the app uses Google Gemini 2.0 Flash to extract the license plate number automatically.
- 📄 RC Details Scraping: Retrieves vehicle details (Owner Name, Fuel Type, Registration Date, etc.) from
carinfo.app. - 👮 Challan/Fine Checking: Fetches pending traffic fines, violation details, and total amounts from the KSP Traffic system.
- evidence Retrieval: Extracts and displays links to image/video proof of traffic violations if available.
- Web Interface: Clean Flask-based UI to view all data in one place.
- Local Storage: Automatically saves retrieved data into local
.txtfiles for record-keeping.
- Python 3.x
- Flask (Web Framework)
- Selenium (Web Scraping & Automation)
- Google Generative AI (Image-to-Text extraction)
- Requests (API Endpoints handling)
Before running the project, ensure you have the following:
- Google Chrome installed.
- Google Gemini API Key (Get it from Google AI Studio).
- Valid Cookies for scraping (see configuration below).
-
Clone the repository:
git clone https://github.com/Sanjaydk357/v-intel.git cd v-intel -
Install dependencies:
pip install flask requests google-generativeai selenium urllib3
-
Project Structure: Ensure your directory looks like this:
/V-Intel (project-root) │ ├── static/ │ └── styles.css # Custom layout and design rules ├── templates/ │ └── index.html # HTML Frontend ├── Genai.key # File containing your Google API Key ├── cookies.json # Exported cookies for carinfo.app ├── app.py └── README.md
Create a file named Genai.key in the root directory and paste your Google API key inside it (no extra spaces or newlines).
To avoid bot detection, this scraper relies on existing session cookies.
-
cookies.json:
- Install a "Cookie Editor" extension in your browser.
- Go to
https://www.carinfo.app. - Export cookies as JSON and save them to
cookies.jsonin the project root.
-
Challan Session ID: The code currently uses a hardcoded
JSESSIONIDfor the KSP website in the variablechallan_cookie.- If the challan search fails: You may need to visit
https://kspapp.ksp.gov.in, inspect network requests, grab theJSESSIONIDfrom the headers, and update thechallan_cookievariable inapp.py.
- If the challan search fails: You may need to visit
-
Run the Flask application:
python app.py
-
Open your browser and navigate to:
http://127.0.0.1:5000/ -
To Use:
- Option A: Upload an image of a vehicle.
- Option B: Type the vehicle number manually (e.g.,
KA01AB1234). - Click Submit.
-
Wait for the scraping process to finish. The results will be displayed on the screen and saved to
[VehicleNumber].txt.
This tool is intended for educational purposes only.
- Scraping government websites or private platforms may violate their Terms of Service.
- The cookie sessions hardcoded or used in this script may expire and require manual updates.
- Use responsibly and do not flood servers with requests (Rate limiting is handled appropriately in the code).
Contributions are welcome! Please feel free to submit a Pull Request.