Add ability to change API params value #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey man, I've been following your repos for a while they are genuinely impressive. Great work!
Recently, I've been working with translating Japanese text to English using your library. While it's been immensely useful, I felt the translation results were slightly off compared to when I translate pages directly in the browser.
Intrigued by this, I did a bit of digging and found a disparity in the 'client' parameter value in the request made to Google. Specifically, I noticed that my browser was passing { "client": "te_lib" } while your library passes { "client": "t" }.
I did some experimentation and swapped these values around. From my testing, it seems like "te_lib" gives more accurate results for my use case. Have you come across anything like this before with this parameter? It's possible that the current value might be a little outdated? I put together this PR to allow for customization of this param. Let me know if you think a different approach would be better. (Maybe this PR could even close out this lingering issue).
Looking forward to your thoughts. Cheers!
Japanese Source (Browser)
English Translation (Browser)
English Translation (client set to "t" (default))
English Translation (client set to "te_lib")
URL for reference: https://www.athome.co.jp/kodate/6978282056/?DOWN=1&BKLISTID=001LPC&sref=list_simple