When a site changes its login redirects, old session-handling code often breaks because the authentication flow now depends on
-
New cookies
-
Csrf tokens
-
Different domain/sub domain
-
OAuth callbacks
-
Stricter cookies policies
The fix is usually to rebuild the authenticated session flow instead of reusing stale cookies
Check what your script is actually receiving
A very common script mistake is your “ download” is actually taking you back to login .
Debug this first
response = session.get(download_url, allow_redirects=True)
print(response.url)
print(response.status_code)
for r in response.history:
print(r.status_code, r.url)
If you see
/login
/auth
/sso/callback
Then the session cookie is probably not being preserved correctly .