-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用騰訊翻譯出現問號操作 #383
Comments
|
|
翻译可以正常使用吗 |
網址可以。 |
|
全COPY了給你︰ 分隔線======================= curl 'https://transmart.qq.com/api/imt' |
@umm233 另題外話,騰訊的翻譯質量真的一般,只比GOOGLE略強,弱於DEEPL跟彩雲,兩者的網頁版要不要考慮搞搞? |
DeepL和彩云都已经支持了,需要自行申请api-key使用 |
你這個騰訊用的網頁版的吧? |
在linux下执行这个试试: curl --location 'https://transmart.qq.com/api/imt' \
--header 'content-type: application/json' \
--header 'origin: https://transmart.qq.com' \
--header 'referer: https://transmart.qq.com/zh-CN/index' \
--header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36' \
--data '{
"header": {
"fn": "auto_translation",
"client_key": "browser-chrome-121.0.0-Windows_10-80e5f7b6-2630-45c0-9b70-b6b1f4089538-1707969713717"
},
"type": "plain",
"model_category": "normal",
"source": {
"lang": "en",
"text_list": [
"",
"test",
""
]
},
"target": {
"lang": "zh"
}
}' |
我電腦小白沒有linux… |
建议先使用其他服务翻译,我暂时复现不出来你的情况... |
把这个保存成一个test.py文件,执行 import requests
import json
url = "https://transmart.qq.com/api/imt"
payload = json.dumps({
"header": {
"fn": "auto_translation",
"client_key": "browser-chrome-121.0.0-Windows_10-80e5f7b6-2630-45c0-9b70-b6b1f4089538-1707969713717"
},
"type": "plain",
"model_category": "normal",
"source": {
"lang": "en",
"text_list": [
"",
"test",
""
]
},
"target": {
"lang": "zh"
}
})
headers = {
'content-type': 'application/json',
'origin': 'https://transmart.qq.com',
'referer': 'https://transmart.qq.com/zh-CN/index',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text) |
|
我感觉正常,可能真的是一些奇奇怪怪的风控?你再试试翻译电子书。 |
有可能是IP的問題吧,我掛VPN一直換IP出現頻率下降 |
我目前也出现这个情况,而且用的是本地ip |
指令為︰
python make_book.py --book_name test_books/opps.epub --model tencentransmart
甚麼鬼auto_translation…
The text was updated successfully, but these errors were encountered: