From 1a52775974833d5d162ae7240bb329c09b2d9f42 Mon Sep 17 00:00:00 2001 From: John Smith Date: Sat, 28 Nov 2020 22:05:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DB=E7=AB=99=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/translate.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/models/translate.py b/models/translate.py index a59ffb4..0dfd55f 100644 --- a/models/translate.py +++ b/models/translate.py @@ -149,7 +149,8 @@ class TencentTranslate(TranslateProvider): async with _http_session.post('https://fanyi.qq.com/api/' + reauthuri) as r: if r.status != 200: - logger.warning('TencentTranslate init request failed: status=%d %s', r.status, r.reason) + logger.warning('TencentTranslate init request failed: reauthuri=%s, status=%d %s', + reauthuri, r.status, r.reason) return False data = await r.json() except (aiohttp.ClientConnectionError, asyncio.TimeoutError): @@ -412,8 +413,10 @@ class BilibiliTranslate(TranslateProvider): async with _http_session.get( 'https://api.live.bilibili.com/av/v1/SuperChat/messageTranslate', params={ - 'parent_area_id': '1', - 'area_id': '199', + 'room_id': '21396545', + 'ruid': '407106379', + 'parent_area_id': '9', + 'area_id': '371', 'msg': text } ) as r: