-
Notifications
You must be signed in to change notification settings - Fork 18
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
一些反馈建议 #13
Comments
关于gif动图需要更多信息 |
经测试,QQ仅支持发送总帧数在300张以内的动图gif(包括300张),独立于图片大小限制 |
了解,之后会尝试禁止高帧数gif或者进行抽帧 |
可以加一个清理图片CQ码和链接 function translate(sourceLang, targetLang, sourceText, context, reply = false) {
//console.log(sourceText.replace(/\[CQ:image.*?\]/g,""));//清理图片CQ码
//console.log(sourceText.replace(/(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/g, ''));//清理链接
let temp = sourceText.replace(/&/g, "&").replace(/[/g, "[").replace(/]/g, "]").replace(/</g, "<").replace(/>/g, ">").replace(/\[CQ:image.*?\]/g, "").replace(/(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/g, '');
if (temp == "") {
return;
}
axios({
url: TENCENT_TRANS_API,
method: "POST",
headers: httpHeader(true),
data: {
"qtk": qtk,
"qtv": qtv,
"source": sourceLang,
"target": targetLang,
"sourceText": temp
}
}).then(res => {
let targetText = "";
for (let i in res.data.translate.records) {
targetText += res.data.translate.records[i].targetText;
}
trans_text = reply ? `[CQ:reply,id=${context.message_id}]${targetText}` : `[${targetText}]`;
replyFunc(context, trans_text);
}).catch(err => {
console.error(new Date().toString() + ":" + "翻译:" + err);
})
} |
一般情况的推特链接 推特还有这种链接 |
可能是有这种吧。。。但谁会用啊,不考虑 |
1、解析PC端微博链接无效https://weibo.com/5488749285/HAYBHqGJt 和 https://www.weibo.com/5488749285/HAYBHqGJt
2、go-cqhttpv0.9.25-fix3现在支持发送30MB大小的图片,可以适当放开图片大小限制。
3、b站的api找不到置顶动态信息 https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/space_history
4、发现无法正常解析b站专栏内容
其它补充:gif动图高帧数(至少225张以上),可能无法发送成功,和图片大小无关
The text was updated successfully, but these errors were encountered: