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.example
to.env
. - Update the
USN
variable in.env
with the correct DSCE result URL.
Example
.env
file: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
.env
file. - 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
.env
file 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
.env
file 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! 🚀