return captcha ID
@@ -975,6 +975,18 @@ func postSessions(b *OGame, gameEnvironmentID, platformGameID, username, passwor
}
defer resp.Body.Close()
+ if resp.StatusCode == 409 {
+ // Question: https://image-drop-challenge.gameforge.com/challenge/c434aa65-a064-498f-9ca4-98054bab0db8/en-GB/text
+ // Icons: https://image-drop-challenge.gameforge.com/challenge/c434aa65-a064-498f-9ca4-98054bab0db8/en-GB/drag-icons
+ // POST: https://image-drop-challenge.gameforge.com/challenge/c434aa65-a064-498f-9ca4-98054bab0db8/en-GB {"answer":2} // 0 indexed
+ gfChallengeID := resp.Header.Get("gf-challenge-id") // c434aa65-a064-498f-9ca4-98054bab0db8;https://challenge.gameforge.com
+ if gfChallengeID != "" {
+ parts := strings.Split(gfChallengeID, ";")
+ challengeID := parts[0]
+ return out, errors.New("captcha required, " + challengeID)
+ }
+ }
+
if resp.StatusCode >= 500 {
return out, errors.New("OGame server error code : " + resp.Status)
}
