From b55a338fb4f7ca88b4b168a5a9aae332c275c68e Mon Sep 17 00:00:00 2001 From: Rany Date: Fri, 25 Oct 2024 12:24:58 +0300 Subject: [PATCH] Fix 403 error (#288) * Fix typo in setting of User-Agent I accidently added a $ probably because I was writing some shell code at the same time. Oops.... Signed-off-by: rany * Update Chromium User-Agent version to 130 Signed-off-by: rany --------- Fixes: https://github.com/rany2/edge-tts/issues/286 Signed-off-by: rany --- src/edge_tts/constants.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/edge_tts/constants.py b/src/edge_tts/constants.py index 60f8919..ca39846 100644 --- a/src/edge_tts/constants.py +++ b/src/edge_tts/constants.py @@ -8,11 +8,11 @@ TRUSTED_CLIENT_TOKEN = "6A5AA1D4EAFF4E9FB37E23D68491D6F4" WSS_URL = f"wss://{BASE_URL}/edge/v1?TrustedClientToken={TRUSTED_CLIENT_TOKEN}" VOICE_LIST = f"https://{BASE_URL}/voices/list?trustedclienttoken={TRUSTED_CLIENT_TOKEN}" -CHROMIUM_MAJOR_VERSION = "129" +CHROMIUM_MAJOR_VERSION = "130" BASE_HEADERS = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" - f" (KHTML, like Gecko) Chrome/${CHROMIUM_MAJOR_VERSION}.0.0.0 Safari/537.36" - f" Edg/${CHROMIUM_MAJOR_VERSION}.0.0.0", + f" (KHTML, like Gecko) Chrome/{CHROMIUM_MAJOR_VERSION}.0.0.0 Safari/537.36" + f" Edg/{CHROMIUM_MAJOR_VERSION}.0.0.0", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-US,en;q=0.9", }