File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1+ import re
12import sys
23from typing import Union , List
34from dataclasses import dataclass
@@ -100,10 +101,9 @@ def _login(self):
100101 # url will be "/scripts/mgrqispi.dll?APPNAME=CampusNet&PRGNAME=STARTPAGE_DISPATCH&ARGUMENTS=-N954433323189667,-N000019,-N000000000000000"
101102 # and arguments will be "-N954433323189667,-N000019,-N000000000000000"
102103 # 954433323189667 is the session id, 000019 is the menu id and -N000000000000000 are temporary arguments
103- url = "=" .join (response .headers ["Refresh" ].split (";" )[
104- 1 ].strip ().split ("=" )[1 :])
105- arguments = url .split ("ARGUMENTS=" )[1 ]
106- self .session_number = arguments .split ("," )[0 ][2 :]
104+ self .session_number = re .match (
105+ r"^.*-N(\d+),-N(\d+),-N(\d+)$" , response .headers ["Refresh" ]
106+ ).group (1 )
107107
108108 def _get_semesters (self ):
109109 """
You can’t perform that action at this time.
0 commit comments