Skip to content

Commit

Permalink
修復 "卡池歷史紀錄 API 資料取得失敗" 問題,因 miHoYo 對 API 進行限速,HTTP 請求發送太快會回傳 -110 失敗。
Browse files Browse the repository at this point in the history
  • Loading branch information
GoneTone committed Nov 24, 2021
1 parent 7a2ff89 commit 736669d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/MiHoYoApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ class MiHoYoApi {

logArray = logArray.concat(res)
page++

await new Promise((resolve) => setTimeout(resolve, 300)) // 應付 miHoYo API 限速,每 300ms 發送一次 HTTP 請求
} else {
break
}
Expand Down

0 comments on commit 736669d

Please sign in to comment.