Skip to content

Commit

Permalink
Add the fix suggested for #72
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanhrabcak committed Dec 9, 2023
1 parent 5785207 commit 510dca6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion edupage_api/substitution.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_timetable_changes(self, date: date) -> Optional[list[TimetableChange]]:

for change in class_changes_rows:
change = change.replace("\">", "</span>")
action, lesson_n, title = change.split("</span>")[:-1]
action, lesson_n, title = change.split("</span>", 3)[:-1]

if "<img src=" in title:
title = title.split(">")[1]
Expand Down
1 change: 0 additions & 1 deletion examples/substitution-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def get_text(missing_teachers: Optional[list[EduTeacher]], timetable_changes: Op

missing_teachers_writer.writeheader()
missing_teachers_dict = [{"name": t} for t in data["missingTeachers"]]
print(missing_teachers_dict)
missing_teachers_writer.writerows(missing_teachers_dict)

stream.write("\n\n")
Expand Down

0 comments on commit 510dca6

Please sign in to comment.