forked from Anri/cal8tor
fix when there the course's name isn't in <em>
This commit is contained in:
parent
5077d6cb38
commit
ea9c271b2c
1 changed files with 4 additions and 1 deletions
|
@ -52,7 +52,10 @@ pub async fn timetable(
|
||||||
location_tracker += 1;
|
location_tracker += 1;
|
||||||
} else {
|
} else {
|
||||||
courses_vec.push(Some(models::Course {
|
courses_vec.push(Some(models::Course {
|
||||||
name: course.select(&sel_em).next().unwrap().inner_html(),
|
name: match course.select(&sel_em).next() {
|
||||||
|
Some(value) => value.inner_html(),
|
||||||
|
None => course.inner_html().split("<br>").next().unwrap().to_string(),
|
||||||
|
},
|
||||||
professor: match course
|
professor: match course
|
||||||
.select(&sel_small)
|
.select(&sel_small)
|
||||||
.next()
|
.next()
|
||||||
|
|
Reference in a new issue