def login(self):
if not hasattr(self, '<STR_LIT>'):<EOL><INDENT>self.last_connect = time.time()<EOL>s = requests.session()<EOL>s.get('<STR_LIT>')<EOL>data = {<EOL>'<STR_LIT>': self.student_id,<EOL>'<STR_LIT>': self.password_md5<EOL>}<EOL>r6 = s.post('<STR_LIT>', headers={<EOL>'<STR_LIT>': self._ua},<EOL>data=data)<EOL>if r6.text == '<STR_LIT>':<EOL><INDENT>return s<EOL><DEDENT>else:<EOL><INDENT>s.close()<EOL>raise AuthFailure(r6.text)<EOL><DEDENT><DEDENT>
登陆系统,返回一个requests的session对象

:return: session with login cookies
:rtype: requests.sessions.Session