This commit is contained in:
RainSun 2020-11-16 16:11:27 +08:00
commit 7b56cf30a1

View File

@ -13,7 +13,6 @@ class Crawler(object):
self.__password = password
self.__phone = phone
self.__session = None
self.__ip = None
self.__student_id = None
self.__student_name = None
self.__grade_data = ''
@ -59,7 +58,6 @@ class Crawler(object):
raise('账号或密码错误')
except:
return ('账号或者密码错误', 510)
self.__ip = ['jwgls0', 'cust', 'edu', 'cn']
r = self.__session.get(url='https://mysso.cust.edu.cn/cas/login?service=https://jwgls1.cust.edu.cn/welcome', allow_redirects=False)
ticket = r.headers['Location'][42:]
asp_net_sessionid_param = {'Ticket': ticket, 'Url': 'https://jwgls1.cust.edu.cn/welcome'}
@ -332,5 +330,5 @@ class Crawler(object):
'grade': self.__grade_data,
'schedule': self.__schedule_data
},
200
200
)