def login(session):
if not session.auth.username or not session.auth.password:<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>_LOGGER.info("<STR_LIT>")<EOL>session.cookies.clear()<EOL>try:<EOL><INDENT>session.get(session.auth.base_url + LOGIN_PAGE)<EOL>resp = session.post(session.auth.base_url + LOGIN_URL, data={<EOL>'<STR_LIT:username>': session.auth.username,<EOL>'<STR_LIT:password>': session.auth.password<EOL>})<EOL><DEDENT>except RequestException:<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>if resp.status_code != <NUM_LIT:200>:<EOL><INDENT>raise VooblyError('<STR_LIT>')<EOL><DEDENT>_save_cookies(session.cookies, session.auth.cookie_path)<EOL>
Login to Voobly.