def login(): if login.logged: return login.cookie login.cookie = nicopy.login(NICO_EMAIL, NICO_PASSWORD) login.logged = True return login.cookie