Skip to content

Commit e7bdebf

Browse files
committed
fix: add missing lab slots
1 parent a414459 commit e7bdebf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/parsers/timetable_parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'Monday': [],
1111
}
1212
theory_timings=['DAY','TYPE','08:00 - 08:50', '09:00 - 09:50', '10:00 - 10:50', '10:00 - 10:50', '11:00 - 11:50', '11:00 - 11:50', '12:00 - 12:50','12:00 - 12:50', '13:00 - 13:50', 'Lunch', '14:00 - 14:50', '14:00 - 14:50', '15:00 - 15:50', '15:00 - 15:50', '16:00 - 16:50', '16:00 - 16:50', '17:00 - 17:50', '17:00 - 17:50', '18:00 - 18:50', '19:00 - 19:50']
13-
lab_timings=['TYPE','08:00 - 08:50','09:00 - 09:50', '09:50 - 10:40','09:50 - 10:40', '11:00 - 11:50', '11:00 - 11:50', '11:50 - 12:40', '11:50 - 12:40', '12:50 - 13:30', 'Lunch', '14:00 - 14:50', '14:00 - 14:50', '14:50 - 15:40','16:00 - 16:50','16:00 - 16:50', '16:50 - 17:40', '16:50 - 17:40', '18:00 - 18:50', '18:50 - 19:30']
13+
lab_timings=['TYPE','08:00 - 08:50','09:00 - 09:50','09:00 - 09:50', '09:50 - 10:40','09:50 - 10:40', '11:00 - 11:50', '11:00 - 11:50', '11:50 - 12:40', '11:50 - 12:40', '12:50 - 13:30', 'Lunch', '14:00 - 14:50', '14:00 - 14:50', '14:50 - 15:40','14:50 - 15:40', '16:00 - 16:50','16:00 - 16:50', '16:50 - 17:40', '16:50 - 17:40', '18:00 - 18:50','18:00 - 18:50', '18:50 - 19:30']
1414
lst_table=[]
1515

1616
def get_course_info(html : str) -> list:
@@ -107,6 +107,7 @@ def parse_time_table(html : str) -> dict[str, list]:
107107
for j in range(min(len(line), len(lab_timings))):
108108
if line[j] not in {'-', 'Lunch', ''}:
109109
time_slot = lab_timings[j]
110+
110111
time_table_data[day].append({time_slot: line[j]})
111112
for day, sessions in time_table_data.items():
112113
time_table_data[day] = [session for session in sessions if all(len(value) >= 8 for value in session.values())]

0 commit comments

Comments
 (0)