extractCalendarEventDetails function
Future<CalendarEventDetails>
extractCalendarEventDetails(
- BeautifulSoup soup,
- Student student,
- CalendarEvent event
Implementation
Future<CalendarEventDetails> extractCalendarEventDetails(
BeautifulSoup soup, Student student, CalendarEvent event) async {
Bs4Element? testElement =
soup.find("*", id: 'm_Content_LectioDetailIslandProevehold_pa');
Bs4Element? privateAppointmentElement =
soup.find("*", id: 'm_Content_island1_pa');
if (testElement != null) {
return extractTestEventDetails(testElement, student);
}
if (privateAppointmentElement != null) {
return extractPrivateDetails(privateAppointmentElement, event);
}
return extractRegularEventDetails(soup);
}