Coder Social home page Coder Social logo

google_translation_clinet's Introduction

Image text

一个封装Google 翻译的小软件

制作方法:

1.当我们想要翻译一个单词或者其他文字的时候 我们在翻译框中输入 可以看到url会发生变化 url直接发生变化 一般都是get请求提交

2.进入Google 翻译的网页 打开f12 输入我们要翻译的内容 按f5刷新 找到发请求的url 即为 https://translate.google.cn/translate_a/single?client=t&sl=zh-CN&tl=en&hl=zh- CN&dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&ie=UTF-8&oe=UTF-8&otf=1&ssel=0&tsel=0&kc=1&tk=182860.282026&q=%E6%88%91%E6%93%8D

3.在该url中有两项是会发生变化的 一项是tk 他会随着翻译内容的不同而发生变化 而q则是我们要翻译的内容

4.tk的获取是靠js获取 如何获取 已经在代码中贴出

效果图:

Image text

如果翻译没成功 可能是因为特殊符号的原因

google_translation_clinet's People

Contributors

onestepandtwosteps avatar

Watchers

James Cloos 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.