diff --git a/service/scoresaber/user_info.go b/service/scoresaber/user_info.go index 202bf26..4d66a99 100644 --- a/service/scoresaber/user_info.go +++ b/service/scoresaber/user_info.go @@ -140,10 +140,10 @@ type LeaderboardData struct { func FetchCountryLeaderboard(country string, offset int, ssID string) (LeaderboardData, error) { // 根据偏移量计算页数 - if offset < 0 { - offset = 0 + if offset < 1 { + offset = 1 } - page := offset / 50 + page := (offset-1)/50 + 1 url := fmt.Sprintf("https://scoresaber.com/api/players?countries=%s&page=%d", country, page) // 创建请求