iterapi/iterapi.py
def login(self):
        """
        Logs in the student portal to retrieve cookies

        self.cookies -> request.Response.cookies

        """
        payload = str({"username": self.regdno,
                       "password": self.password,
                       "MemberType": "S"})

        response = requests.post(
            Student.LOGIN_URL,
            data=payload,
            headers=Student.HEADERS)
        if response.status_code == 200:
            if "login successful" in response.json()['message'].lower():
                return response.cookies
            else:
                print('Invalid username or password')
                raise Exception('Invalid username or password')
        else:
            print("Error: ", response.status_code)
            return None

        Logs in the student portal to retrieve cookies

        self.cookies -> request.Response.cookies

        
Logs in the student portal to retrieve cookies
self.cookies -> request.Response.cookies
Logs in the student portal to retrieve cookies self . cookies - > request . Response . cookies
def login(self):
        payload = str({"username": self.regdno,
                       "password": self.password,
                       "MemberType": "S"})
        response = requests.post(
            Student.LOGIN_URL,
            data=payload,
            headers=Student.HEADERS)
        if response.status_code == 200:
            if "login successful" in response.json()['message'].lower():
                return response.cookies
            else:
                print('Invalid username or password')
                raise Exception('Invalid username or password')
        else:
            print("Error: ", response.status_code)
            return None
def login ( self ) : payload = str ( { "username" : self . regdno , "password" : self . password , "MemberType" : "S" } ) response = requests . post ( Student . LOGIN_URL , data = payload , headers = Student . HEADERS ) if response . status_code == 200 : if "login successful" in response . json ( ) [ 'message' ] . lower ( ) : return response . cookies else : print ( 'Invalid username or password' ) raise Exception ( 'Invalid username or password' ) else : print ( "Error: " , response . status_code ) return None
Logs in the student portal to retrieve cookies
self.cookies -> request.Response.cookies
Logs in the student portal to retrieve cookies self . cookies - > request . Response . cookies
"""
        Logs in the student portal to retrieve cookies

        self.cookies -> request.Response.cookies

        """
self