[Mobidziennik/Web] Force trimming searched subject name.

This commit is contained in:
Kuba Szczodrzyński 2021-02-26 23:08:06 +01:00
parent 74820fe67d
commit efd63797e4
2 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@ class MobidziennikWebAttendance(override val data: DataMobidziennik,
val topic = lesson[1].substringAfter(" - ", missingDelimiterValue = "").takeIf { it.isNotBlank() }
if (topic?.startsWith("Lekcja odwołana: ") == true || entry.isEmpty())
return
val subjectName = lesson[1].substringBefore(" - ")
val subjectName = lesson[1].substringBefore(" - ").trim()
//val team = lesson[3]
val teacherName = lesson[3].fixName()

View File

@ -46,7 +46,7 @@ class MobidziennikWebGrades(override val data: DataMobidziennik,
when (e.tagName()) {
"div" -> {
Regexes.MOBIDZIENNIK_GRADES_SUBJECT_NAME.find(e.outerHtml())?.let {
subjectName = it[1]
subjectName = it[1].trim()
}
}
"span" -> {