From a52adb8f050358b4b323144551b4295a5f3c3c47 Mon Sep 17 00:00:00 2001 From: plainheart Date: Sat, 2 Sep 2023 15:47:05 +0800 Subject: [PATCH] chore: update default userAgent --- README.md | 2 +- src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 719c85d..a8d7242 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ The header value of `user-agent` used in API requests. Default: ``` -Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 +Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 ``` ##### _proxyAgents_ diff --git a/src/index.js b/src/index.js index 5968163..1baa243 100644 --- a/src/index.js +++ b/src/index.js @@ -10,7 +10,7 @@ const TRANSLATE_WEBSITE = TRANSLATE_API_ROOT + '/translator' const TRANSLATE_API = TRANSLATE_API_ROOT + '/ttranslatev3?isVertical=1' const TRANSLATE_API_SPELL_CHECK = TRANSLATE_API_ROOT + '/tspellcheckv3?isVertical=1' -const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' +const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36' // PENDING: fetch from `params_RichTranslate`? const MAX_TEXT_LEN = 1000