Skip to main content

A little python to parse Google Translate webpages

Project description

python-google-translate

A python module for Google Translate (without using the API)

This module lets you get two things:

  • translate(text, destination_language, source_language)

Translates the given text into the chosen language.

text: The text to translate
destination_language: The language code (two letters) of the language you want to get.
source_language (default: auto): The language code (two letters) of the language the text is in. ('auto' detects automatically the language the text is in)
  • detect_language(text, result_language)

Gives the language of the given text.

text: The text to check.
result_language: The language code (two letters) of the output language.

Installation

You can install python-google-translate via PIP the Python Package Index Manager.

pip install python-google-translate

But you also need to install PhantomJS

On macOS, you can install it with Homebrew:

brew cask install phantomjs

Dependencies

This module has one python module dependency: Selenium, used to automate browsers which is downloaded when installing python-google-translate with PIP.

But you also need to install PhantomJS, a headless, lightweight browser which I use to get webpages as quick as possible.

Google Translate belongs to Google LLC, fully owned by Alphabet Inc.

© Anime no Sekai - 2020

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyGoogleTranslate-1.0.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

pyGoogleTranslate-1.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page