translate-tools / linguist

Translate web pages, highlighted text, Netflix subtitles, private messages, speak the translated text, and save important translations to your personal dictionary to learn words even offline

Home Page:https://linguister.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can you adapt the Deepl code for my server?

nimbus2332 opened this issue · comments

Привет!

Столкнулся проблемой: я создал Deepl переводчик в настройках расширения, и прописал код взятый отсюда:

https://github.com/translate-tools/linguist-translators/blob/master/translators/generated/DeepL.js

С одним отличием, вместо обычного API URL Deepl указал свой адрес: http://localhost:1188/v1/translate

Для этого localhost:1188 APi ключ не нужен, поэтому оставил поле API пустым. В итоге возникает ошибка при попытке перевести что-либо. Ошибка 400.

С другим расширением проблем, я не буду указывать/упоминать название другого расширении чтобы не сочи мой пост рекламным.

Для теста может взять список публичных мостов для Deepl: https://github.com/xiaozhou26/serch_deeplx/blob/main/success_result.txt

Пожалуйста сделай мод кода для подобных решений, это единственный дешёвый и доступный способ использовать Deepl в повседневном жизни, кроме как платить за каждый символ.

Другие расширения не удобные с постоянным вылетом и тормозами. только ваш код умеет собирать 50 000-150 000 символов/слов без напряга.

Hi, where i can find info about API of mentioned bridges?

Also please give a links on another addons where it works fine. It may be useful for me to known the best solutions in translation sphere to keep quality is highest

Hi, where i can find info about API of mentioned bridges?

Also please give a links on another addons where it works fine. It may be useful for me to known the best solutions in translation sphere to keep quality is highest

API: https://deeplx.owo.network/

Another extension: https://deeplx.owo.network/integration/immersive-translate.html

This API is have rate limit for requests per minute. It means we probably can't use this service for Linguist, because pages translation may emit a lot of requests.

Maybe we could map requests to many servers, but it is too unreliable and fragile since for correct work we need a lot of servers. If part of Linguist users will start use this translator, we may reach limit too fast (because proxy server probably rate limited by original DeepL too)

This API is have rate limit for requests per minute. It means we probably can't use this service for Linguist, because pages translation may emit a lot of requests.

Maybe we could map requests to many servers, but it is too unreliable and fragile since for correct work we need a lot of servers. If part of Linguist users will start use this translator, we may reach limit too fast (because proxy server probably rate limited by original DeepL too)

У меня есть DeepL Pro аккаунт, используя cookies аккаунта можно использовать DeepLX API, и в этом случае запросы не ограничены.

Как я уже отметил выше я использую другое расширение который работает невероятно плохо и пожирает 5-15 (!) ГБ ОЗУ при попытке перевести текст весом 10 МБ.

Список который я представил вам это бесплатный вариант с ограничением на IP, те кто переводят 10к-100к-1m слов покупают DeepL Pro аккаунты за 2$ на 1 месяц и спокойно пользуется официальным переводом с неофициальным API DeepLX.

Пожалуйста сделайте модификацию, если нужно могу представить вам токен DeepL Pro с возможностью создать Docker DeepLX API одной командой.

@nimbus2332 could you please elaborate how it works, to make it clear how reliable this solution.

I have couple questions

  • What limits for "paid" token for 2$?
  • How to use token? Should user pass token in headers to proxy server? If yes, it means a proxy server may steal your token and use for their purposes.
  • What the purpose of proxy servers if user have DeepL token?

@nimbus2332 could you please elaborate how it works, to make it clear how reliable this solution.

I have couple questions

  • What limits for "paid" token for 2$?
  • How to use token? Should user pass token in headers to proxy server? If yes, it means a proxy server may steal your token and use for their purposes.
  • What the purpose of proxy servers if user have DeepL token?
  1. Нет каких либо четких лимитов, если слишком часто обращаться к серверам DeepL, например 200 запросов в секунду DeepL могут на время ограничить запросы вашего IP. Поправлю вас, не токен, а аккаунт DeepL Pro, каждый аккаунт выдается на 30 дней. Не путать с Deepl API Pro. Еще раз подчеркну что не лимита на переведенных символов как это устроено в DeepL API.

  2. Допустив, вы покупаете аккаунт Deepl Pro за $2, затем проходите авторизацию на сайте Deepl, получаете cookies аккаунта, после чего запускаете DeeplX API используя этот cookies. Проще говоря DeeplX выступает как мост перенаправляя запросы к сайту deepl.com под видом обычного пользователя который переводит текст на сайте на главном странице (большая форма перевода текста).

  3. Прокси не нужен если есть Deepl Pro аккаунт. Прокси потребуется только если хотите использовать бесплатный вариант (публичные мосты в txt файле) который я выше уже скинул выше.

Я уже перевел 5-10 миллионов слов (слова, а не символы) установив лимит в 50 запросов в секунду, и все работает кроме ужасно плохого расширения браузера.

Метод рабочий, уже 2 года разработчики поддерживают, это важно для них т.к. они сами пользуются. Другие сервисы переводчики с китайского плохо переводят. https://github.com/OwO-Network/DeepLX/commits/main/?after=f78de5833710abb0f58aedccc79dfdf57799048b+174

@nimbus2332 ok i may try to work on,

Я уже перевел 5-10 миллионов слов (слова, а не символы) установив лимит в 50 запросов в секунду, и все работает

Sounds good!

How to buy this account for $2? I just checked their site, i see the minimal price is $10

image

If you mean some reseller, you may tell me about it by email rob@vitonsky.net

@nimbus2332 ok i may try to work on,

Я уже перевел 5-10 миллионов слов (слова, а не символы) установив лимит в 50 запросов в секунду, и все работает

Sounds good!

How to buy this account for $2? I just checked their site, i see the minimal price is $10

image

If you mean some reseller, you may tell me about it by email rob@vitonsky.net

You can search for different resellers in different languages: English (z2u.com), Chinese (Taobao, pinduoduo), Russian (plati.market), Spanish (:D)

Just translate the request: buy a DeepL Pro account

Я не смог купить китайские аккаунты из-за требования китайского номера, но на двух площадках покупаю аккаунты: plati{.}market (5 раз) и z2u{.}com (1 раз)

Я также отправил свой cookies, можете одной командой поднять Docker. (не получилось, ваш email не принимает письма с yandex.net)