临时修复腾讯翻译 (#64)

* 临时修复腾讯翻译

* Update list.json
This commit is contained in:
Xtao_dada 2020-10-18 00:17:12 +08:00 committed by GitHub
parent a73f5eeef4
commit 65f81f0f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@
}, },
{ {
"name": "xtao-some", "name": "xtao-some",
"version": "1.0", "version": "1.01",
"section": "daily", "section": "daily",
"maintainer": "xtaodada", "maintainer": "xtaodada",
"size": "18.8 kb", "size": "18.8 kb",

View File

@ -372,7 +372,7 @@ async def tx_t(context):
try: try:
await context.edit("正在生成翻译中 . . .") await context.edit("正在生成翻译中 . . .")
tx_json = json.loads(requests.get( tx_json = json.loads(requests.get(
"https://xtaolink.cn/git/m/t.php?lang=" + lang + '&text=' + clear_emojis(message)).content.decode( "http://xtaolink.cn/git/m/t.php?lang=" + lang + '&text=' + clear_emojis(message)).content.decode(
"utf-8")) "utf-8"))
if not tx_json['msg'] == 'ok': if not tx_json['msg'] == 'ok':
context.edit("出错了呜呜呜 ~ 翻译出错") context.edit("出错了呜呜呜 ~ 翻译出错")
@ -387,4 +387,4 @@ async def tx_t(context):
await context.edit("输出超出 TG 限制,正在尝试上传文件。") await context.edit("输出超出 TG 限制,正在尝试上传文件。")
await attach_log(result, context.chat_id, "translation.txt", context.id) await attach_log(result, context.chat_id, "translation.txt", context.id)
return return
await context.edit(result) await context.edit(result)