Skip to content
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

fix:处理百度平台调用频率太快被限制 #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zh-d-d
Copy link

@zh-d-d zh-d-d commented Feb 20, 2023

使用平台为百度

当输入单词时,会出现"访问频率受限" 异常现象。
image
image

增加了一个防抖策略


const word: string = Array.from(tjs.args).pop() as string;

const result = await translator.translate(word);

console.log(result);
}
}, 500);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此处的延时间,建议支持通过系统变量设置,用法类似上面的 tjs.getenv("platform")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
自带防抖把这个时间调大点

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

刚刚找了好一会才找到这个配置项,记录一下:在 [Edit Object] 中打开之后,点击 Run Behavior

image

@NICK-T-D
Copy link

NICK-T-D commented Jun 27, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants