This script scrapes all the end-semester results from the DSCE result portal and processes the data into downloadable PDFs.
- Fetches and downloads results for all students based on their USNs.
- Saves the result PDFs into organized directories based on branch codes.
- Simple and quick to set up.
-
Clone the Repository:
git clone https://github.com/govindup63/result-scraper.git cd result-scraper -
Install Dependencies:
npm install
-
Configure the Environment Variables:
- Rename
.env.exampleto.env. - Update the
USNvariable in.envwith the correct DSCE result URL.
Example
.envfile:USN='http://XX.XX.XXX.XXX:8080/birt/frameset?__report=mydsi/exam/Exam_Result_Sheet_dsce.rptdesign&__format=pdf'
- Rename
-
Run the Script:
npm run dev
- The script reads the URL from the
.envfile. - It makes requests to the DSCE result portal to fetch individual PDFs for each student.
- Results are saved in directories organized by branch codes and student USNs.
- Ensure the URL provided in the
.envfile is valid and accessible. - The script assumes the DSCE portal follows a consistent format for USNs and branches.
- If the script fails to fetch data:
- Verify that the URL in the
.envfile is correct and reachable. - Check your internet connection and portal access permissions.
- Verify that the URL in the
- If the output directory is not created:
- Ensure the script has write permissions to the project folder.
This project is licensed under the MIT License. Feel free to use, modify, and share!
If you'd like to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request. 😊
Happy scraping! 🚀