Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-Urgent, class with a class number of 10 #2

Open
oconnellamethyst opened this issue Sep 10, 2018 · 4 comments
Open

Non-Urgent, class with a class number of 10 #2

oconnellamethyst opened this issue Sep 10, 2018 · 4 comments

Comments

@oconnellamethyst
Copy link

2018/09/09 20:11:14 Warning: Couldn't find course number
2018/09/09 20:11:14 ESL
2018/09/09 20:11:14 ESL 10 -- Beg Grammar
panic: runtime error: index out of range

goroutine 1 [running]:
main.getCourses.func1(0x1, 0xc420087bf0)
/home/travis/gopath/src/github.com/acmumn/class-lister/scraper.go:50 +0xdcb
github.com/acmumn/class-lister/vendor/github.com/PuerkitoBio/goquery.(*Selection).Each(0xc420087b90, 0xc420053dc0, 0x2a)
/home/travis/gopath/src/github.com/acmumn/class-lister/vendor/github.com/PuerkitoBio/goquery/iteration.go:10 +0x4e
main.getCourses(0xc42001463c, 0x3, 0x20, 0x6b, 0xc42052e800)
/home/travis/gopath/src/github.com/acmumn/class-lister/scraper.go:35 +0x18c
main.main()
/home/travis/gopath/src/github.com/acmumn/class-lister/main.go:25 +0x3fb

Don't actually need this fixed, but thought you'd find it interesting, there's a course with a course number of 10. Also, thanks for adding the part where I can now tell what the error is. Very nice code.

@oconnellamethyst
Copy link
Author

2018/09/09 20:41:27 Warning: Couldn't find course number
2018/09/09 20:41:27 PUBH
2018/09/09 20:41:27 PUBH 20 -- Community Engagement
panic: runtime error: index out of range

goroutine 1 [running]:
main.getCourses.func1(0x1, 0xc420158570)
/home/travis/gopath/src/github.com/acmumn/class-lister/scraper.go:50 +0xdcb
github.com/acmumn/class-lister/vendor/github.com/PuerkitoBio/goquery.(*Selection).Each(0xc420158510, 0xc420053dc0, 0x2a)
/home/travis/gopath/src/github.com/acmumn/class-lister/vendor/github.com/PuerkitoBio/goquery/iteration.go:10 +0x4e
main.getCourses(0xc420014550, 0x4, 0x15, 0x5a, 0xc420576800)
/home/travis/gopath/src/github.com/acmumn/class-lister/scraper.go:35 +0x18c
main.main()
/home/travis/gopath/src/github.com/acmumn/class-lister/main.go:25 +0x3fb

@oconnellamethyst
Copy link
Author

Why would anyone have a 2 digit course number?

2018/09/09 20:44:27 Warning: Couldn't parse "(No Room Required)"
2018/09/09 20:44:27 SENG
2018/09/09 20:44:27 1 (25332) Lecture (No Room Required) Wendt, Kevin Daniel 3/0 (closed)
2018/09/09 20:44:51 Warning: Couldn't find course number
2018/09/09 20:44:51 SW
2018/09/09 20:44:51 SW 20 -- Community Engagement
panic: runtime error: index out of range

goroutine 1 [running]:
main.getCourses.func1(0x1, 0xc42044c180)
/home/travis/gopath/src/github.com/acmumn/class-lister/scraper.go:50 +0xdcb
github.com/acmumn/class-lister/vendor/github.com/PuerkitoBio/goquery.(*Selection).Each(0xc42044c120, 0xc420053dc0, 0x2a)
/home/travis/gopath/src/github.com/acmumn/class-lister/vendor/github.com/PuerkitoBio/goquery/iteration.go:10 +0x4e
main.getCourses(0xc420014698, 0x2, 0x3, 0xa4, 0xc4205ac800)
/home/travis/gopath/src/github.com/acmumn/class-lister/scraper.go:35 +0x18c
main.main()
/home/travis/gopath/src/github.com/acmumn/class-lister/main.go:25 +0x3fb

@oconnellamethyst
Copy link
Author

Alright, the moment you've been waiting for!
mostcourses.txt

A list of most courses!

@oconnellamethyst
Copy link
Author

Further distilled into this, a list of most lecturers
teachers.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant