Python调用微软翻译接口

1、WhatsApp 免费群发工具:免魔法登录,自带谷歌翻译,支持多开,聊天记录备份,集成 ChatGPT永久免费,扫码即用

2、海外社媒客户开发免费工具:从Google搜索结果、Facebook公共主页、Facebook行业群组、Instagram同行关注者、Google地图等渠道,批量提取客户Email和WhatsApp联系方式。 

Python调用微软翻译接口,实现文字内容的自动翻译。

批量关键字翻译,批量内容的伪原创,有了这个接口都可以实现。python代码如下:

import json
import requests
import urllib
args = {
‘client_id’: ”,#your client id here
‘client_secret’: ”,#your azure secret here
‘scope’: ‘http://api.microsofttranslator.com’,
‘grant_type’: ‘client_credentials’
}
oauth_url = ‘https://datamarket.accesscontrol.windows.net/v2/OAuth2-13’
oauth_junk = json.loads(requests.post(oauth_url,data=urllib.urlencode(args)).content)
translation_args = {
‘text’: “hello”,
‘to’: ‘zh’,
‘from’: ‘en’
}
headers={‘Authorization’: ‘Bearer ‘+oauth_junk[‘access_token’]}
translation_url = ‘http://api.microsofttranslator.com/V2/Ajax.svc/Translate?’
translation_result = requests.get(translation_url+urllib.urlencode(translation_args),headers=headers)
print translation_result.content

需要安装python的requests模块,自己下载即可。

我们能做什么?

外贸网站建设、外贸SEO代运营、Google&Facebook广告投放、WhatsApp群发获客、WhatsApp客户管理、海关数据+EDM获客、询盘云 Marketing CRM

外贸行业十五年老兵,自己做外贸十年,询盘云已获五轮融资,团队三百多人,服务数万家外贸企业!

感兴趣的话留个联系方式,我会尽快回复你!

    仍有疑问,搜索微信号 jiadingqiang,或点击 链接,加个 微信 好友,一起交流。

    发表评论