Git Product home page Git Product logo

baidufanyi's Introduction

百度翻译接口代码

代码流程

  • 先从网页源码获取gtktoken这两个参数
  • 执行生成sign的js代码,参数为gtkquery_str(即要翻译的文本)
  • signtoken皆为提交数据时使用,利用这几个参数来构造请求的数据

使用流程

  • 先打开百度翻译,利用开发者工具,复制请求的cookie, 替换掉代码中的所有cookie
  • 然后直接运行代码即可

注意事项

  • token的生成依赖于你的cookie,所以请务必更换成自己的值

baidufanyi's People

Contributors

a16su avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.