From b09135b9e3c549f89e8148f4429f71a6ad76c315 Mon Sep 17 00:00:00 2001 From: wh0o7 Date: Fri, 10 Nov 2023 15:15:11 +0300 Subject: [PATCH] Fix day parse --- TeachersTimetable/Services/ParseService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TeachersTimetable/Services/ParseService.cs b/TeachersTimetable/Services/ParseService.cs index 96865fd..89475bc 100644 --- a/TeachersTimetable/Services/ParseService.cs +++ b/TeachersTimetable/Services/ParseService.cs @@ -125,9 +125,9 @@ await this._botService.SendAdminMessageAsync(new SendMessageArgs(0, var teacherInfo = new TeacherInfo(); var lessons = new List(); var lessonsElements = - teachersAndLessons[i].FindElements(By.XPath(".//table/tbody/tr")).ToList(); + teachersAndLessons[i].FindElements(By.XPath(".//table/tbody/tr | .//p")).ToList(); - if (lessonsElements.Count < 1) + if (lessonsElements.Count < 1 || lessonsElements[0].TagName == "p") { teacherInfo.Lessons = lessons; teacherInfo.Name = teacher;