Skip to content

Commit

Permalink
Merge pull request #49 from NYIST-OSUG/master
Browse files Browse the repository at this point in the history
修复 南阳理工学院
  • Loading branch information
YZune authored Feb 26, 2022
2 parents 825fafe + d8331a6 commit 9399a8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/parser/NYISTParser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class NYISTParser(source: String) : Parser(source) {
type = 2
}
weekList.forEach{
val weeks=it.substringAfter("[").substringBefore("]").split("-")
val newit=it.substringAfter("").substringBefore("")
val weeks=newit.substringAfter("[").substringBefore("]").split("-")
val startWeek = weeks.first().toInt()
val endWeek = weeks.last().toInt()
courseList.add(Course(name = courseName, day = day, room = room, teacher = teacher,
Expand All @@ -54,7 +55,7 @@ class NYISTParser(source: String) : Parser(source) {
}
}
fun main() {
val file = File("D:/project/NYISTOSUG/CourseWeb/CR/我的课表.html")
val file = File("D:/project/NYISTOSUG/CourseWeb/DP/我的课表.html")
val parser = NYISTParser(file.readText())
parser.saveCourse()
}

0 comments on commit 9399a8c

Please sign in to comment.