Schedule Module for bonch
Project description
Модуль расписания СПБГУТ
Установка
pip install bonch-schedule
Пример
Через билдер
import requests
from bonch.schedule.ScheduleBuilder import ScheduleBuilder
from bonch.schedule.site.SiteScheduleType import SiteScheduleType
from bonch.schedule.site.groups.GroupListService import GroupListService
session = requests.session()
builder = ScheduleBuilder(
session=session
)
# Расписание из лк
schedule = builder.with_lk(session_id="yourmidenfromlkcookies")
# Или
# Расписание с сайта
schedule_type = SiteScheduleType.FULL_TIME_AND_EVENING_LESSONS
# Получаем факультеты и группы в них по типу расписания
groups_service = GroupListService(session)
faculties = groups_service.faculties(schedule_type)
selected_group = faculties[0].groups[0]
schedule = builder.with_site(
group_id=selected_group.group_id, # Id группы с сайта
schedule_type=schedule_type # Тип расписания
)
print(f"today schedule: {schedule.today()}")
print(f"today week schedule: {schedule.week()}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bonch_schedule-0.0.1.tar.gz
(35.3 kB
view details)
Built Distribution
File details
Details for the file bonch_schedule-0.0.1.tar.gz
.
File metadata
- Download URL: bonch_schedule-0.0.1.tar.gz
- Upload date:
- Size: 35.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.6.30-2-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | abf360eded2d56ebd720f1a37877ce6e4e3f4687c30072ef6b57cc7aa493e1ad |
|
MD5 | 0fa1c85713a90b1d530c40dcb9aaae4f |
|
BLAKE2b-256 | 4c4b8a548df8c5f2059538ecf6215b4e21a883b65c7dd0ac4bfe954cefcf3404 |
File details
Details for the file bonch_schedule-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: bonch_schedule-0.0.1-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.6.30-2-MANJARO
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24b8952560f242736c5b3c7c52e2c203ae1f39c00852e430b30202b40b5facb0 |
|
MD5 | 3fe03f4e6b354008c6028ae892788b43 |
|
BLAKE2b-256 | 794455739c26c1ea3dd34470c2e8f0317d949b3982ef7af737720b562d815e17 |