Giter Site home page Giter Site logo

Comments (6)

ttys3 avatar ttys3 commented on July 24, 2024 1

the real code is in the HTML page. and it is encrypted.

from google-translate-api.

ttys3 avatar ttys3 commented on July 24, 2024 1

if you debug in dev tools, it may generate a wrong token like:

["FNL82,0,1,66,24095,60,24097",null,null,23879,987,null,null,0,"2"]

from google-translate-api.

RipperTs avatar RipperTs commented on July 24, 2024

Certain networks require the X-Goog-BatchExecute-Bgr header to be sent on requests, or the autocorrect will not be applied to some translations(seemingly typos where a letter is dropped, such as "I spea Dutch!" instead of "I speak Dutch!").

The code for generating this header I believe is found in this static script.

I believe in xH.prototype.s()

This would likely take a while to fix.

Hello, can you generate this request header parameter value based on this static script?

from google-translate-api.

AidanWelch avatar AidanWelch commented on July 24, 2024

@RipperTs As far as I know, yes, but I'm not certain.

from google-translate-api.

ttys3 avatar ttys3 commented on July 24, 2024

no. that' s wrong.

xH.prototype.s=function(){var a=Swa([_.Ffa,_.Hfa,_.Ifa,_.Qr,_.Kfa,_.Rfa,_.Sfa,_.Tfa,_.Nk]); is just a feature id to request api endpoint map.

I debug and confirmed that. it has nothing to do with the header.

from google-translate-api.

AidanWelch avatar AidanWelch commented on July 24, 2024

I don't have the time to look into this more, but if someone can figure it out I would happily merge the PR!

from google-translate-api.

Related Issues (20)

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.