# UDISE+ Portal Specific Notes

## Portal Details
- **URL:** https://udiseplus.gov.in/
- **Login Method:** Username + Password + School Code
- **School Code Format:** 11 digits (e.g., 24110206411)
- **Session:** This document captures portal-specific behavior discovered during automation

## Session Notes (2026-05-08)

### Initial Portal Exploration
- Link `https://share.google/lN2RzgAakl3gu1qT4` redirects to UDISE+ portal
- Portal is Angular-based SPA (Single Page Application)
- React/Angular app with dynamic content loading
- Base href: `https://udiseplus.gov.in/`

### Login Page Structure
From HTML analysis:
- Meta tags indicate Bootstrap-based UI
- Authentication uses standard form POST
- Likely fields: `username`, `password`, possibly `schoolCode`
- CSRF token may be present in hidden inputs
- After login redirects to dashboard

### Student Data Location
- Navigation: After login → Student/Pupil section
- Data appears as HTML tables on page
- Download buttons present for Excel/CSV export
- Tables use standard HTML `<table>` tags

## Common Issues & Solutions

### Issue 1: Dynamic Content Loading
**Symptom:** Elements not found immediately after page load

**Solution:** Use explicit waits:
```python
WebDriverWait(driver, 20).until(
    EC.presence_of_element_located((By.NAME, "username"))
)
```

### Issue 2: Captcha/2FA
If portal adds captcha:
- Not automatable without manual intervention
- Consider manual download + local processing only
- Alternative: Check if API access available for registered schools

### Issue 3: Session Timeout
Portal may timeout after inactivity.

**Mitigation:**
- Keep browser window visible (not headless)
- Increase timeout values
- Re-login if session expires

## Data Column Mapping

UDISE+可能会输出这些列（需要实际下载验证）：
- `UDISE Code` → school identifier
- `Student Name` / `Name`
- `Father's Name` / `Father Name`
- `Mother's Name` / `Mother Name`
- `Date of Birth` / `DOB`
- `Gender` (M/F)
- `Category` / `Caste` (General/SC/ST/OBC)
- `Aadhaar Number`
- `Mobile Number`
- `Class` / `Standard`
- `Section`
- `Roll No.` / `Roll Number`

**Note:** Column names vary by portal version. `scrape_table_data()` function automatically adapts.

## API Alternative Research

UDISE+ may have a REST API for:
- Data submission (DEO/EO level)
- Report generation
- School-wise data fetch

**If available:**
1. Contact district education office for API credentials
2. Replace Selenium with `requests` library
3. Faster, more reliable, no browser dependency

## Maintenance Checklist

When portal updates:
- [ ] Check if login page URL changed
- [ ] Verify field names (username/password)
- [ ] Confirm student data table structure
- [ ] Test download button locator
- [ ] Validate Excel output format

Report issues to: `~/UDISE_Data/issues_log.md`

---

*This is a living document. Update after each portal change.*
