├── .gitignore ├── assets └── 2022 stats.pdf ├── src └── main.py └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.log -------------------------------------------------------------------------------- /assets/2022 stats.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wthrajat/pumeet-result-scraper/HEAD/assets/2022 stats.pdf -------------------------------------------------------------------------------- /src/main.py: -------------------------------------------------------------------------------- 1 | from selenium import webdriver 2 | from selenium.webdriver.common.by import By 3 | from selenium.webdriver.chrome.options import Options 4 | import time 5 | 6 | driver = webdriver.Chrome() 7 | driver.implicitly_wait(2) 8 | driver.get("https://results.puexam.in/HomePage.aspx") 9 | driver.find_element(By.ID, "ctl00_LinkButton_Entrance").click() 10 | driver.find_element(By.ID, "ctl00_LinkButton7").click() 11 | driver.find_element(By.ID, "ctl00_cph1_lbtn_PUM").click() 12 | 13 | print("{:<10} {:<30} {:<10} {:<10}".format("RollNo", "Name", "Marks", "Rank")) 14 | print("="*70) 15 | for roll in range(900001, 900394): 16 | 17 | driver.find_element(By.ID, "ctl00_cph1_txtRollNo").clear() 18 | driver.find_element(By.ID, "ctl00_cph1_txtRollNo").send_keys(roll) 19 | driver.find_element(By.ID, "ctl00_cph1_btnShowResult").click() 20 | name = driver.find_element(By.ID, "ctl00_cph1_lblCName").text 21 | rollNo = driver.find_element(By.ID, "ctl00_cph1_lblRollNo").text 22 | 23 | if (("Not Qualified" not in driver.page_source) and ("Absent" not in driver.page_source)): 24 | marks = driver.find_element(By.ID, "ctl00_cph1_lblMarks").text 25 | rank = driver.find_element(By.ID, "ctl00_cph1_lblRank").text 26 | line = "{:<10} {:<30} {:<10} {:<10}".format(rollNo, name, marks, rank) 27 | print(line) 28 | else: 29 | print(f"{roll} {name} was absent.") if ("Absent" in driver.page_source) else print(f"{roll} {name} did not qualify.") 30 | driver.find_element(By.ID, "ctl00_cph1_btnBack").click() 31 | 32 | print("="*70) 33 | 34 | driver.quit() 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) [![Generic badge](https://img.shields.io/badge/fun-project-red.svg)](https://shields.io/) [![Maintenance](https://img.shields.io/badge/Maintained%3F-no-yellow.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity) ![Terminal](https://badgen.net/badge/icon/terminal?icon=terminal&label) 2 | 3 | ## What is this? 4 | Python automation script to see rank, marks, name etc. of all the candidates who gave PUMEET exam 5 | - [PUMEET](https://pumeet.puchd.ac.in/) is an entrance examination for migration/department change across [Panjab University](https://puchd.ac.in) colleges 6 | 7 | ![2023-08-13-23:10:18-screenshot](https://github.com/wthrajat/pumeet-result-scraper/assets/38693805/19044a1a-7c5c-4280-b8ee-b93dade4cb5b) 8 | 9 | 10 | ## How to use this? 11 | Just run the script & see the output in the console/terminal 12 | 13 | ### Pre-requisites 14 | 1. Selenium `pip install selenium` 15 | 2. Webdriver for your browser (Using any `Chromium` based browser is recommended for this): 16 | - For Chrome, install [chromedriver](https://chromedriver.chromium.org/downloads) 17 | - For Firefox, install [geckowebdriver](https://github.com/mozilla/geckodriver/releases) 18 | 19 | 3. Shortcut: if the webdriver isn't installed in the system path, you can just provide its location as: 20 | ```python 21 | driver = webdriver.Chrome("/path/to/webdriver") 22 | # OR 23 | driver = webdriver.Firefox("/path/to/webdriver") 24 | ``` 25 | 4. (If you are on Windows, make sure to put `.exe` in the path, i.e., `driver = webdriver.Chrome("/path/to/webdriver.exe")` 26 | 27 | 5. (Optional) Print to the console or use Pandas library to import this to a python list or whatever to sort it according to the rank. 28 | (Sorted version in `./assets`) 29 | 30 | ## Why? 31 | Many people wanted to see the Marks vs Rank data for this year's PUMEET 32 | 33 | --------------------------------------------------------------------------------