bgtu-parser — brand new parser for obtaining schedule
- Selenium —
pip install selenium
- FastAPI —
pip install fastapi
- pydantic —
pip install pydantic
- uvicorn —
pip install uvicorn
- Open Terminal or cmd
- Change directory to one which contains the app with the
cd
command - Install all dependencies from
requirements.txt
:pip install -r requirements.txt
(or manually) - Run parser:
python app.py
- Launch parser
- Open http://localhost:8443/ in your browser
- If there is a documentation on the index page, then all systems are operational. You are ready to make some requests.
Basically, you can use built-in Swagger UI to interact with API, but the most common way is to make request from another program.
There are two types of requests at the moment:
- Get schedule:
get_schedule(group)
http://localhost:8443/api/v2/schedule?group=group
, wheregroup
parameter is your group. - Get group list:
get_groups(faculty, year)
http://localhost:8443/api/v2/groups?faculty=faculty&year=year
, wherefaculty
andyear
— your parameters.
There are all of the requests you can perform, using bgtu-parser.
- Create a parser, fill it with basic function — obtaining schedule
- Add obtaining the group list feature
- Refactor all the code so it doesn’t look messy and full of unnecessary comments
- Rebase on FastAPI
- Add a feature to get information about teachers and their schedule
- Add a function to get a departments, faculties and information about them
All credits goes to xhable1337, author of this repository.