Compare commits

..

No commits in common. "0f3652d8cc22f21c7ba2ac2832a2ca7b3ac5dad6" and "9c374bf13088602042905bbbb43be5144b030ae3" have entirely different histories.

1 changed files with 3 additions and 6 deletions

View File

@ -232,12 +232,9 @@ def parse_course_td(td, note=None):
cr_delim = (
len(course_info)
- 1
- list(
bool(re.search(r"^\([0-9]", s.strip())) for s in course_info[::-1]
).index(True)
- list(bool(re.search(r"\(", s)) for s in course_info[::-1]).index(True)
)
assert bool(re.search(r"[0-9]\)", course_info[-1]))
except (ValueError, AssertionError):
except ValueError:
cr_delim = len(course_info)
# note serves as a credit count override, since the RPI-side credit counts
@ -248,7 +245,7 @@ def parse_course_td(td, note=None):
"catalog": td.find_element(By.TAG_NAME, "span").text,
}
if note is None:
out.update({"credits": str(" ".join(course_info[cr_delim:])[1:-1]).strip()}),
out.update({"credits": str(" ".join(course_info[cr_delim:])[1:-1])}),
return out
else:
out.update({"note": note})