bob-plugin-akl-deepl-free-translate icon indicating copy to clipboard operation
bob-plugin-akl-deepl-free-translate copied to clipboard

deepl python脚本一直429错误

Open yhn747497 opened this issue 1 year ago • 3 comments

佬 为什么我用你的python逻辑 自己写了个 成功一次后然后一直429错误 请求频率不高啊 几分钟一次了都

yhn747497 avatar May 08 '23 08:05 yhn747497

你是用的这个吗 https://github.com/akl7777777/deepl-free-translate-service/blob/main/deepl_translate.py

如果是的话,注意一下,请求体有几个冒号后面有空格,必须保留,格式化JSON之后就会被识别到篡改了请求

akl7777777 avatar May 08 '23 15:05 akl7777777

比如这一段 if (post_data["id"] + 5) % 29 == 0 or (post_data["id"] + 3) % 13 == 0: post_str = post_str.replace('"method":"', '"method" : "', 1) else: post_str = post_str.replace('"method":"', '"method": "', 1) 里面的 method 后的冒号 前后空格注意一定要保留

akl7777777 avatar May 08 '23 15:05 akl7777777

有些是后面有空格,有些是前面有空格

akl7777777 avatar May 08 '23 15:05 akl7777777