forked from Anri/cal8tor
Don't crash when the class isn't bold
This commit is contained in:
parent
8c62c479d1
commit
1c20dbfc26
1 changed files with 5 additions and 8 deletions
|
@ -85,14 +85,11 @@ pub async fn timetable(
|
||||||
}
|
}
|
||||||
None => None,
|
None => None,
|
||||||
},
|
},
|
||||||
room: capitalize(
|
room: capitalize(&mut match course.select(&sel_strong).next() {
|
||||||
&mut course
|
Some(el) => el.inner_html().replace("<br>", ""),
|
||||||
.select(&sel_strong)
|
// Error in the site, silently passing... (the room is probably at the professor member)
|
||||||
.next()
|
None => String::new(),
|
||||||
.unwrap()
|
}),
|
||||||
.inner_html()
|
|
||||||
.replace("<br>", ""),
|
|
||||||
),
|
|
||||||
start: location_tracker,
|
start: location_tracker,
|
||||||
size: match course.value().attr("colspan") {
|
size: match course.value().attr("colspan") {
|
||||||
Some(i) => i.parse().unwrap(),
|
Some(i) => i.parse().unwrap(),
|
||||||
|
|
Reference in a new issue