stumash / CoursePlanner

http://conucourseplanner.online
MIT License
5 stars 3 forks source link

Add ELEC and COEN sequences #85

Closed Davidster closed 7 years ago

Davidster commented 7 years ago

~Please merge pull request #83 before reviewing this PR.~

Summary

I've added 21 new sequences from the ELEC and COEN program types. The sequences for these programs were formatted completely differently on the concordia website as you can see.

I also simplified/improved the output of the sequence scraper.

To accomplish this, I needed to rewrite the webscraper to include a function which could successfully parse both the old sequence format and the new sequence format. The easiest way to do this was to stop using cheerio and navigate through the text directly with the help of some regexes. The fact that all these ELEC and COEN sequences were contained on one page with no convenient css class names to jump to further complicated things.

I also added 1 other sequence: COMP Computation Arts but a lot of the courses are missing from the DB 😢, see #86

We now support 69 recommended sequences in total. You can test them all on courseplannerd