Skip to main content

Wikipedia ContentTranslation (CXServer) API wrapper to be used with mwclient

Project description

PyPI version

mwclient-contenttranslation

The wrapper of ContentTranslation (CXServer) API of Wikipedia to be used with mwclient.

Usage

Install via PyPI: pip install mwclient-contenttranslation

from mwclient import Site
from mwclient_contenttranslation import CxTranslator
site = Site("en.wikipedia.org")
site.login(USERNAME, PASSWORD)
translator = CxTranslator(site)
translator.translate_text(["小熊維尼", "蜂蜜罐", "小熊維尼掉進蜂蜜罐"])
# ['Winnie the Pooh', 'honey pot', 'Winnie the Pooh fell into a jar of honey']

Disclaimer

Intended for good use only. Never abuse it.

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

mwclient_contenttranslation-0.1.1.post1.tar.gz (15.0 kB view hashes)

Uploaded Source

Built Distribution

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