Madgrades / madgrades-extractor

UW-Madison course and grade distribution data extraction tool.
MIT License
14 stars 4 forks source link

Year formatting not up to date #8

Closed Xiaohan-Shen closed 4 years ago

Xiaohan-Shen commented 4 years ago

I tried to clone the project and gave the '-d' argument to the problem with the following error:

Scraping for subjects and report URLs...
Exception in thread "main" java.lang.NumberFormatException: For input string: "|"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:580)
    at java.lang.Integer.parseInt(Integer.java:615)
    at com.keenant.madgrades.tools.Scrapers.toTermCode(Scrapers.java:101)
    at com.keenant.madgrades.tools.Scrapers.scrapeGradeReports(Scrapers.java:66)
    at com.keenant.madgrades.CommandLineApp.main(CommandLineApp.java:78)

It seems that it is caused by the code on line 101 in Scrapers.java:

int year = Integer.parseInt(termName.split(" ")[1]);

I suspect that the format has changed and the algorithm here need to be updated.