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

overhaul scrapers/math_dept.py #91

Merged
merged 11 commits into from
Dec 7, 2024
Merged

Conversation

duck-master
Copy link
Contributor

This is major overhaul of scrapers/math_dept.py. Even though I know it isn't actually being used in production, I still think it's good to make all the code as pretty and modular as possible for posterity.

More specifically, the main code in math_dept.py (all the random stuff that used to be non-indented) is now divided into:

  • run(), the main entry point, which uses three other helper functions:
    • get_rows() for scraping
    • parse_subject(subject) to parse the title specifically
    • parse_row(row) to parse an individual row
  • test_parse_when() as a sanity check that parse_when(when) works properly

@psvenk psvenk merged commit 018c5d9 into sipb:main Dec 7, 2024
3 checks passed
@duck-master duck-master deleted the math-dept-refactor branch December 8, 2024 23:40
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

Successfully merging this pull request may close these issues.

2 participants