From 79314eb9f1d623489d8699339b32cd57c38978fa Mon Sep 17 00:00:00 2001 From: megahomyak Date: Fri, 25 Nov 2022 10:36:16 +0500 Subject: [PATCH] Redirects following fix I am very sorry --- netschoolapi/netschoolapi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netschoolapi/netschoolapi.py b/netschoolapi/netschoolapi.py index 3a3aaec..eefca32 100644 --- a/netschoolapi/netschoolapi.py +++ b/netschoolapi/netschoolapi.py @@ -132,7 +132,7 @@ async def _request_with_optional_relogin( follow_redirects=False): try: response = await self._wrapped_client.request( - requests_timeout, request + requests_timeout, request, follow_redirects ) except httpx.HTTPStatusError as http_status_error: if ( @@ -339,6 +339,7 @@ async def download_profile_picture( method="GET", url="users/photo", params={"at": self._access_token, "userId": user_id}, - ) + ), + follow_redirects=True, ) ).content)