An automated web scraping, data processing, and visualization pipeline for MITS Gwalior university portal results.
scraper/: Contains the Selenium web scraping logic and TrOCR CAPTCHA solver.database/: Handles integration with Google Sheets using the Google Drive/Sheets APIs.backend/: FastAPI backend to serve data from the Google Sheet to the React frontend.frontend/: React + Vite frontend dashboard for visualizing the results.
Install the required dependencies in a virtual environment:
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt- Go to the Google Cloud Console.
- Create a new project and enable the Google Sheets API and Google Drive API.
- Create a Service Account and download the JSON key file.
- Rename the key file to
service_account.jsonand place it in the root directory. - Create a new Google Sheet and share it with the email address of the service account you created (give it Editor permissions).
Create a .env file in the root directory with the following variables:
GOOGLE_SHEET_URL="https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit"
MITS_PORTAL_URL="https://example-mits-portal.com/"
(Wait to populate MITS_PORTAL_URL until provided)
To run the web scraper and update the Google Sheet:
python -m scraper.scraperStart the FastAPI server:
uvicorn backend.main:app --reload --port 8000In a new terminal:
cd frontend
npm install
npm run dev