Unofficial Scraper API for Delhi Technological University (DTU) Webpage and results page
API Link : https://dtu-api.vercel.app/
Scrapes the following information from Official DTU Webpage :
- Page Title
- Last Updated Date & Time
- Top Menu Bar
- Menu Bar
- Sliding Image Showcase
- Side Menu
- Current Note
- Imporatant Updates
- Current Events
- Latest News
- First Year Notices
- Notices
- Jobs
- Tenders
- Registeration Schedule
About the results, the scraper extracts the following from results webpage :
- Exam Name
- Details
- Serial Number
- Date
This all pretty much sums up the whole webpage contents!
API output have been classified into two different types :
-
To extract the usually required data which usually is variable over time, use
api
link : https://{server_url}/api -
To extract data for full webpage ( required for cloning the webpage ) which is usually constant over time, use the
webpage
link : https://{server_url}/webpage -
To obtain details for results' page, use the
exam
link, refer to https://{server_url}/exam
API is deployed on Vercel. Check out the API Usage and Output formats
-
Deploy on vercel directly through deployment button
-
To deploy to vercel on your own, follow the following steps :
- Fork this repository on your system
- Make sure you have installed Vercel CLI
- Open the repository in your terminal
- Run command
vercel --prod
and follow the instructions
-
To deploy on
localhost
or onVPS
:-
Install python requirements
pip install -r requirements.txt
-
Execute server.py
python server.py
or
python3 server.py
-
Kindly refer to sample.json for understanding using a compact prettified JSON Output of the Scraper API (Variable Data API)
The output for the api
and webpage
for every field is in either one of the two formats or simply a string :
{
"name" : "Title of information",
"link" : "link_to_information"
}
{
"name": "Title of information",
"sub_list": [
{
"name": "Title of sub-information 1",
"link": "link_to_information"
},
{
"name": "Title of sub-information 2",
"sub_list": [
{
"name": "Title of sub-information 1",
"link": "link_to_information"
},
]
}
]
}
If the output is for an image sample, then output will be in format :
{
"name": "Name of image",
"image_link": "link_of_image"
}
For exam
link, directly refer to an example.
- This Project is Apache-2.0 Licensed
- Copyright 2021 Vishal Das