Skip to content

Commit

Permalink
Fix day parse
Browse files Browse the repository at this point in the history
  • Loading branch information
wh0o7 committed Nov 10, 2023
1 parent cd3385f commit b09135b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TeachersTimetable/Services/ParseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ await this._botService.SendAdminMessageAsync(new SendMessageArgs(0,
var teacherInfo = new TeacherInfo();
var lessons = new List<Lesson>();
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;
Expand Down

0 comments on commit b09135b

Please sign in to comment.