Skip to content

Commit 9399a8c

Browse files
authored
Merge pull request #49 from NYIST-OSUG/master
修复 南阳理工学院
2 parents 825fafe + d8331a6 commit 9399a8c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/parser/NYISTParser.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class NYISTParser(source: String) : Parser(source) {
4141
type = 2
4242
}
4343
weekList.forEach{
44-
val weeks=it.substringAfter("[").substringBefore("]").split("-")
44+
val newit=it.substringAfter("").substringBefore("")
45+
val weeks=newit.substringAfter("[").substringBefore("]").split("-")
4546
val startWeek = weeks.first().toInt()
4647
val endWeek = weeks.last().toInt()
4748
courseList.add(Course(name = courseName, day = day, room = room, teacher = teacher,
@@ -54,7 +55,7 @@ class NYISTParser(source: String) : Parser(source) {
5455
}
5556
}
5657
fun main() {
57-
val file = File("D:/project/NYISTOSUG/CourseWeb/CR/我的课表.html")
58+
val file = File("D:/project/NYISTOSUG/CourseWeb/DP/我的课表.html")
5859
val parser = NYISTParser(file.readText())
5960
parser.saveCourse()
6061
}

0 commit comments

Comments
 (0)