We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9c2494 commit 85738e5Copy full SHA for 85738e5
1 file changed
CampusNet.py
@@ -148,10 +148,8 @@ def _get_modules(self):
148
except ValueError:
149
grade = None
150
# getting id for this module
151
- exams_button = cells[5]
152
- # FIXME: This is a hack, looking for a specific substring in JavaScript code.
153
- exams_script = exams_button.find('script').text
154
- exams_id = exams_script.split('","Resultdetails"')[0].split(",-N")[-1]
+ exams_button = cells[5].find("a")
+ exams_id = exams_button.get("href").split(",-N")[-2]
155
modules.append(Module(
156
num=cells[0].text.strip(),
157
name=cells[1].text.strip(),
0 commit comments