Open AidanWelch opened 1 year ago
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?
@RipperTs As far as I know, yes, but I'm not certain.
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.
the real code is in the HTML page. and it is encrypted.
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"]
I don't have the time to look into this more, but if someone can figure it out I would happily merge the PR!
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.