Yandex Free Translate! More than six million requests! No limits or restrictions! Tested within a year!
Π―Π½Π΄Π΅ΠΊΡ ΠΠ΅ΡΠ΅Π²ΠΎΠ΄ΡΠΈΠΊ Π±Π΅ΡΠΏΠ»Π°ΡΠ½ΠΎ (ΠΠΎΠ»Π΅Π΅ ΡΠ΅ΡΡΠΈ ΠΌΠΈΠ»Π»ΠΈΠΎΠ½ΠΎΠ² Π·Π°ΠΏΡΠΎΡΠΎΠ²! ΠΠΈΠΊΠ°ΠΊΠΈΡ ΠΎΠ³ΡΠ°Π½ΠΈΡΠ΅Π½ΠΈΠΉ ΠΈ Π»ΠΈΠΌΠΈΡΠΎΠ²! ΠΡΠΎΠ²Π΅ΡΠ΅Π½ΠΎ Π² ΡΠ΅ΡΠ΅Π½ΠΈΠ΅ Π³ΠΎΠ΄Π°!)
Installing (Π£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ°)
python3 -m pip install git+https://github.com/alekssamos/yandexfreetranslate.git
or (ΠΈΠ»ΠΈ)
python3 -m pip install yandexfreetranslate
Using (ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅)
ΠΡΠ»ΠΈ Π½Π΅ ΡΠ°Π±ΠΎΡΠ°Π΅Ρ, ΡΠΎ ΠΏΡΠΈ ΡΠΎΠ·Π΄Π°Π½ΠΈΠΈ ΠΊΠ»Π°ΡΡΠ° ΠΏΠΎΠΌΠ΅Π½ΡΠΉΡΠ΅ API Π½Π° "ios", ΠΏΠΎ ΡΠΌΠΎΠ»ΡΠ°Π½ΠΈΡ ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΡΡ "web". If it doesn't work, then when creating the class, change the API to "ios", use "web" by default.
from yandexfreetranslate import YandexFreeTranslate
yt = YandexFreeTranslate()
# yt = YandexFreeTranslate(api = "web")
# yt = YandexFreeTranslate(api = "ios")
# yt.set_proxy("socks5", "localhost", 9050, "username", "password")
print(yt.translate("en", "ru", "Hello, world!"))
Or from command line (ΠΠ»ΠΈ ΠΈΠ· ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΈ):
# for use socks4, socks5 or https proxy (ΠΠ»Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ socks4, socks5 ΠΈΠ»ΠΈ https proxy):
export https_proxy=127.0.0.1:9050
# or (ΠΈΠ»ΠΈ)
export https_proxy=username:password@127.0.0.1:9050
python3 yandexfreetranslate/__init__.py en ru "Hello, world!"
# or (ΠΈΠ»ΠΈ)
python3 yandexfreetranslate/__init__.py en ru in.txt
# or (ΠΈΠ»ΠΈ)
python3 yandexfreetranslate/__init__.py en ru in.txt out.txt
Runing tests (ΠΠ°ΠΏΡΡΠΊ ΡΠ΅ΡΡΠΎΠ²)
git clone https://github.com/alekssamos/yandexfreetranslate.git
cd yandexfreetranslate
python3 -m unittest
# or
python3 -m pip install tox
python3 -m tox