V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
mymusise
V2EX  ›  分享创造

百度翻译 Python API | 百度热搜数据

  •  
  •   mymusise ·
    mymusise · 2019-04-21 23:03:49 +08:00 · 1924 次点击
    这是一个创建于 1831 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近做个东西,需要翻译接口,顺便封装了下,分享一下,有需要的取.

    https://github.com/mymusise/Baidu-Translation-SDK

    再顺手分享个之前弄的一个项目, 收集了大半年的百度热搜, 会持续更新, 用来回查某天哪些事情被推到风口浪尖上.

    https://github.com/mymusise/Baidu-Hot

    第 1 条附言  ·  2019-04-22 13:12:05 +08:00

    附个例子

    from baidu_translate import TranslateClient
    
    
    client = TranslateClient()
    print(client.auto2auto('你好, 这是个测试').text)
    
    >>> Hello, this is a test.
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2976 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 11:17 · PVG 19:17 · LAX 04:17 · JFK 07:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.