-
Notifications
You must be signed in to change notification settings - Fork 13
Parse Google Translate directly instead of using the public API #17
Comments
I think we could do even better - look what kind of requests Google Translate website sends. This is how Bing API works. |
I've found this:
If necessary I could probably write a JS parser as well (I know JS, some Nodejs and Electron). |
Thanks, it's a nice reference!
Unfortunately, we need a C++ programmer or wait until I have more free time :) |
This python program use the API, if I'm not mistaken: https://github.com/ssut/py-googletrans/blob/master/googletrans/gtoken.py#L13 Yeep: https://github.com/ssut/py-googletrans/blob/master/googletrans/client.py#L26 |
@Shatur could you provide an option for a terminal command for Google Translate. So everyone could write their own parser / find an API and simply return that with a command line tool. For example, you could just outline in which format the data should be returned, so users can write their parsers in any language, or use any translator or dictionary they want (potentially). |
Not sure if I understand you correctly, but looks like you describing |
I had originally in mind something like a user-defined command line, for example:
So the user could create their own command-line tool (with the name Edit: nevermind, I realized I can just change the URL in the source code and rebuild if I really need it. Hopefully Yandex TTS starts working, since Yandex seems to be probably as good as Google in translating. And maybe I can find someone who could code in C++ and help here. |
Oh, I get it now! |
@Shatur does qonlinetranslator use google translate's mobile stuff which yields worse translation? |
It uses deskop API, but uses mobile user agent in order to bypass google checks. |
@Shatur I'm using crow for subtitle translation, so I wondered if the google engine you implemented brings an error or a limitation, temporary ban depending on the usage. When I checked this repo, I didn't see anyone who encountered such an error, maybe something like this was reported in crow's own repo or maybe they reported it directly to you via e-mail. |
Unfortunately, it's a common problem. People just reported it to the app repo: https://github.com/crow-translate/crow-translate |
@Shatur mpv script uses this command, I wonder do I have to delete the
|
Unfortunately, no, there is no such feature :( |
Describe the problem or limitation you are having
The public Google Translate API is too restrictive, and returns "Too many requests" even after a few requests.
Describe the solution you'd like
Parse the website instead of using the public API.
Describe alternatives you've considered
Switching the translation engine. Not the best solution for some languages, which translate best in Google Translate
Additional context
QTranslate is most likely doing this, since the error "Too many requests" never occurs there.
The text was updated successfully, but these errors were encountered: