Skip to content

Commit

Permalink
更新百度翻译API域名
Browse files Browse the repository at this point in the history
fix #127
  • Loading branch information
FruitLoopsmxd authored Oct 14, 2023
1 parent a11f65e commit c9738b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def bing_translate(texts, to='zh-Hans'):

def baidu_translate(texts, to='zh'):
"""使用百度翻译文本(默认翻译为简体中文)"""
api_url = "https://fanyi-api.baidu.com/api/trans/vip/translate"
api_url = "https://api.fanyi.baidu.com/api/trans/vip/translate"
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
appid = cfg.Translate.baidu_appid
appkey = cfg.Translate.baidu_key
Expand Down

0 comments on commit c9738b5

Please sign in to comment.