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 hashes)
Built Distribution
Close
Hashes for bonch_schedule-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24b8952560f242736c5b3c7c52e2c203ae1f39c00852e430b30202b40b5facb0 |
|
MD5 | 3fe03f4e6b354008c6028ae892788b43 |
|
BLAKE2b-256 | 794455739c26c1ea3dd34470c2e8f0317d949b3982ef7af737720b562d815e17 |