From 890f24997280fae5218899907d06ea57dfa57777 Mon Sep 17 00:00:00 2001 From: James-Lu-none Date: Sun, 7 Apr 2024 21:05:38 +0800 Subject: [PATCH] follow redirection --- lib/src/connector/score_connector.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/connector/score_connector.dart b/lib/src/connector/score_connector.dart index 7e64a4a7..bd3b9cda 100644 --- a/lib/src/connector/score_connector.dart +++ b/lib/src/connector/score_connector.dart @@ -43,6 +43,12 @@ class ScoreConnector { String jumpUrl = tagNode.getElementsByTagName("form")[0].attributes["action"]; parameter = ConnectorParameter(jumpUrl); parameter.data = data; + + final oauthResult = await Connector.getDataByPostResponse(parameter); + final oauthTagNode = parse(oauthResult.data); + final jumpUrl2 = oauthTagNode.getElementsByTagName("a")[0].attributes['href']; + + parameter = ConnectorParameter(jumpUrl2); await Connector.getDataByPostResponse(parameter); return ScoreConnectorStatus.loginSuccess; } catch (e, stack) {