extractCalendarEventDetails function

Future<CalendarEventDetails> extractCalendarEventDetails(
  1. BeautifulSoup soup,
  2. Student student,
  3. 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);
}