diff --git a/edupage_api/login.py b/edupage_api/login.py index 1054b06..a622216 100644 --- a/edupage_api/login.py +++ b/edupage_api/login.py @@ -5,9 +5,13 @@ from requests import Response -from edupage_api.exceptions import (BadCredentialsException, CaptchaException, - MissingDataException, RequestError, - SecondFactorFailedException) +from edupage_api.exceptions import ( + BadCredentialsException, + CaptchaException, + MissingDataException, + RequestError, + SecondFactorFailedException, +) from edupage_api.module import EdupageModule, Module @@ -181,7 +185,7 @@ def login( if "bad=1" in response.url: raise BadCredentialsException() - + data = response.content.decode() if subdomain == "login1": @@ -198,7 +202,7 @@ def login( request_url = ( f"https://{self.edupage.subdomain}.edupage.org/login/twofactor?sn=1" ) - + two_factor_response = self.edupage.session.get(request_url) data = two_factor_response.content.decode() diff --git a/edupage_api/lunches.py b/edupage_api/lunches.py index ae0e83c..109d5a6 100644 --- a/edupage_api/lunches.py +++ b/edupage_api/lunches.py @@ -3,9 +3,12 @@ from datetime import datetime from typing import List, Optional -from edupage_api.exceptions import (FailedToChangeLunchError, - FailedToRateException, InvalidLunchData, - NotLoggedInException) +from edupage_api.exceptions import ( + FailedToChangeLunchError, + FailedToRateException, + InvalidLunchData, + NotLoggedInException, +) from edupage_api.module import EdupageModule, Module, ModuleHelper diff --git a/edupage_api/module.py b/edupage_api/module.py index 949463a..2ba01b9 100644 --- a/edupage_api/module.py +++ b/edupage_api/module.py @@ -6,9 +6,12 @@ import requests -from edupage_api.exceptions import (MissingDataException, - NotAnOnlineLessonError, - NotLoggedInException, NotParentException) +from edupage_api.exceptions import ( + MissingDataException, + NotAnOnlineLessonError, + NotLoggedInException, + NotParentException, +) class EdupageModule: diff --git a/edupage_api/substitution.py b/edupage_api/substitution.py index 9489bb5..5c277c9 100644 --- a/edupage_api/substitution.py +++ b/edupage_api/substitution.py @@ -7,8 +7,7 @@ from enum import Enum from typing import Optional, Union -from edupage_api.exceptions import (ExpiredSessionException, - InvalidTeacherException) +from edupage_api.exceptions import ExpiredSessionException, InvalidTeacherException from edupage_api.module import Module, ModuleHelper from edupage_api.people import EduTeacher, People diff --git a/examples/2fa.py b/examples/2fa.py index 541bf05..77c7642 100644 --- a/examples/2fa.py +++ b/examples/2fa.py @@ -1,8 +1,7 @@ import time from edupage_api import Edupage -from edupage_api.exceptions import (BadCredentialsException, - SecondFactorFailedException) +from edupage_api.exceptions import BadCredentialsException, SecondFactorFailedException edupage = Edupage() diff --git a/examples/all_teachers.py b/examples/all_teachers.py index 35054c7..686ff3a 100644 --- a/examples/all_teachers.py +++ b/examples/all_teachers.py @@ -1,5 +1,4 @@ from edupage_api import Edupage -from edupage_api.people import EduTeacher edupage = Edupage() edupage.login_auto("Username (or e-mail)", "Password")