jrichardsz / appdesktop-super-translator

Simple english spanish english translator. App that translates from English <-> Spanish in a fast.
2 stars 1 forks source link

Users forced to enter Captcha by Google when used extensively the translator. code: 503 #3

Open jrichardsz opened 9 years ago

jrichardsz commented 9 years ago

Scenary: I try to translate and nothing happens. If I start translator with commandline I can see this error:

java.lang.Exception: Error when try to read stream from [http://translate.google.com.pe/translate_a/t?client=t&text=hola&hl=es&sl=es&tl=en&multires=1&prev=btn&ssel=0&tsel=0&sc=1] at com.gtranslate.utils.WebUtils.source(WebUtils.java:46) at com.gtranslate.parsing.ParseTextTranslate.parse(ParseTextTranslate.java:34) at com.gtranslate.Translator.translateAsJsonString(Translator.java:38) at com.gtranslate.Translator.translateAsJsonArray(Translator.java:45) at com.gtranslate.Translator.translate(Translator.java:54) at com.rnasystems.projects.translator.core.GoogleUtilTranslator.translate(GoogleUtilTranslator.java:54) at com.rnasystems.projects.translator.controler.now.ControllerNow.traduceSpanishNow(ControllerNow.java:79) at com.rnasystems.projects.translator.controler.now.ControllerNow.actionPerformed(ControllerNow.java:68) at javax.swing.JTextField.fireActionPerformed(JTextField.java:492) at javax.swing.JTextField.postActionEvent(JTextField.java:705) at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:820) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1633) at javax.swing.JComponent.processKeyBinding(JComponent.java:2851) at javax.swing.JComponent.processKeyBindings(JComponent.java:2886) at javax.swing.JComponent.processKeyEvent(JComponent.java:2814) at java.awt.Component.processEvent(Component.java:6044) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1850) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:712) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676) at java.awt.Component.dispatchEventImpl(Component.java:4502) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://ipv4.google.com/sorry/IndexRedirect?continue=http://translate.google.com.pe/translate_a/t%3Fclient%3Dt%26text%3Dhola%26hl%3Des%26sl%3Des%26tl%3Den%26multires%3D1%26prev%3Dbtn%26ssel%3D0%26tsel%3D0%26sc%3D1&q=CGMSBL4qXuEY09jDrAUiGQDxp4NLGXlb_uL5doGK-KxTiecR721l-zk at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at com.gtranslate.utils.WebUtils.source(WebUtils.java:38) ... 35 more

This http://ipv4.google.com/sorry/IndexRedirect?continue Is google captcha.

Similar Issue: Server returned HTTP response code: 503 on translating even one word But this solution works only for one word. https://code.google.com/p/java-google-translate-text-to-speech/issues/detail?id=8

Regards