extractPlanEntry function

StudyPlanEntry extractPlanEntry(
  1. BeautifulSoup soup
)

Implementation

StudyPlanEntry extractPlanEntry(BeautifulSoup soup) {
  var children = soup.find('*', id: 'phaseContent')!.find('tbody')!.children;
  var teacherElement = children[3].find('span')!;
  var teacherName = teacherElement.text;
  var teacherId = teacherElement.getAttrValue('data-lectiocontextcard')!;
  var teacher = MetaDataEntry(id: teacherId, name: teacherName);
  var description = children[5].children[1].text.trim();
  return StudyPlanEntry(teacher: teacher, description: description);
}