Skip to content

About

A Python-based web parsing and statistical analysis tool for structured examination result extraction and reporting.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

School Result Web Parser

A small Python web parsing example that collects school result data from a public result portal, converts the parsed HTML into a structured table, ranks students by total marks, and exports the results as CSV and Excel files.

This project is meant as a learning example for:

  • Sending form requests with requests
  • Parsing HTML tables with BeautifulSoup
  • Cleaning scraped fields into a Python dictionary
  • Creating reports with pandas
  • Exporting parsed data to .csv and .xlsx

What It Does

The script:

  1. Generates roll numbers from a school code and roll range.
  2. Sends a POST request for each roll number.
  3. Parses student details, subject marks, total marks, grade, and percentage.
  4. Builds a pandas DataFrame.
  5. Adds rank information.
  6. Saves:
    • school_results.csv
    • school_results.xlsx
    • top_10_students.csv
  7. Prints a simple school report in the terminal.

Project Structure

.
├── main.py
├── requirements.txt
├── README.md
├── LICENSE
└── .gitignore

Generated result files are intentionally ignored by Git because they may contain personal student information.

Requirements

  • Python 3.10 or newer
  • Internet connection

Install dependencies:

pip install -r requirements.txt

Usage

Open main.py and check the configuration values near the top:

school_code = "036DB"
start_roll = 1
end_roll = 341

Then run:

python main.py

After the script finishes, output files will be created in the project folder.

Output Columns

The generated dataset can include fields such as:

  • Roll number
  • Student name
  • Parent names
  • Date of birth
  • School name
  • Subject marks
  • Total marks
  • Grade
  • Percentage
  • Rank

Responsible Use

This parser is for educational purposes. Before scraping or publishing any result data:

  • Respect the target website's terms of use.
  • Avoid sending high-frequency requests.
  • Do not upload generated CSV/XLSX files containing private student data.
  • Use only data you are allowed to access and process.

Notes

The parser depends on the current HTML structure of the result website. If the website layout changes, the parsing rules in main.py may need updates.

About

A Python-based web parsing and statistical analysis tool for structured examination result extraction and reporting.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages