Skip to content

Error with google translate api #6

@xvan

Description

@xvan

xgoogle fails due to Abuse

File "./cool.py", line 9, in
print pars.unescape(translate("ayuda", lang_to="en"))
File "/usr/local/lib/python2.7/dist-packages/xgoogle-1.3-py2.7.egg/xgoogle/translate.py", line 49, in translate
raise TranslationError, "Failed translating: %s" % data['responseDetails']
xgoogle.translate.TranslationError: Failed translating: Suspected Terms of Service Abuse. Please see http://code.google.com/apis/errors

When trying to run this:

!/usr/bin/python

import sys
import HTMLParser
from xgoogle.translate import Translator

pars = HTMLParser.HTMLParser()
translate = Translator().translate
print pars.unescape(translate("traducir esto", lang_to="en"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions