Comments (6)
the real code is in the HTML page. and it is encrypted.
from google-translate-api.
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.
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.
@RipperTs As far as I know, yes, but I'm not certain.
from google-translate-api.
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.
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)
- It throws error "fetch is not defined" HOT 2
- Tests fail only because rate limited on single translate HOT 1
- TypeError: (0 , _googleTranslateApiX.translate) is not a function HOT 17
- google-translate-api-x gives below error HOT 3
- Improve `speak` testing
- Caught an error from batch translate HOT 8
- ERROR [TypeError: Cannot convert null value to object] HOT 2
- Issue with the speak functionality HOT 2
- Batch translation error HOT 4
- Can't run on React.js HOT 2
- Big translation slowed down HOT 11
- change speak speed HOT 2
- fetch is not defined after deployment HOT 2
- CORS policy error HOT 4
- Obtain translation synonyms HOT 1
- How to translate image HOT 2
- Is proxying supported in react native? HOT 1
- Discrepancy with Google Translation HOT 7
- Autocorrect example provides different output HOT 1
- `res.from.language.didYouMean` is always true
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-translate-api.