Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate 突然无法使用了 #8

Closed
xiaohanxxx opened this issue Sep 15, 2021 · 13 comments
Closed

Translate 突然无法使用了 #8

xiaohanxxx opened this issue Sep 15, 2021 · 13 comments

Comments

@xiaohanxxx
Copy link

请求失败

@Zzz233
Copy link

Zzz233 commented Sep 15, 2021

这边也是

@lemisky
Copy link
Member

lemisky commented Sep 15, 2021

刚刚看了下,请求被重定向到google.com了,所以需要楼梯。

不知道是不是被玩坏了。

记得上次有人说要翻译几百万条😂

@lemisky
Copy link
Member

lemisky commented Sep 15, 2021

我晚点在电脑里看看,再回复大家

@OneSuperb
Copy link

当前,安卓版的Google 翻译app的服务无法使用,中国大陆的app。
然而在代码里面改domain为com,能翻译,可能cn的被跳转到com,确实需要梯子

@lemisky
Copy link
Member

lemisky commented Sep 15, 2021

当前,安卓版的Google 翻译app的服务无法使用,中国大陆的app。
然而在代码里面改domain为com,能翻译,可能cn的被跳转到com,确实需要梯子

正解.

@lemisky
Copy link
Member

lemisky commented Sep 15, 2021

大家, 设置 domain 参数, 例如: domain='com', domain='com.hk', 然后设置代理 proxies

"""..."""
from pygtrans import Translate

client = Translate(target='en', proxies={'https': 'http://localhost:10809'}, domain='com')

text = '这么好的接口, 可惜了 🍖'

trans_text = client.translate(text).translatedText

print(trans_text)

目前 translate.google.cn 无法访问, 原因未知, 不知后续是否会恢复. ApiKeyTranslate 还是可以正常使用, 无需楼梯.

希望大家以学习交流的态度视之, 如有大量需求, 请购买相应服务.

希望大家以学习交流的态度视之, 如有大量需求, 请购买相应服务.

希望大家以学习交流的态度视之, 如有大量需求, 请购买相应服务. 🌹🌹

@lemisky
Copy link
Member

lemisky commented Sep 15, 2021

可用 domain 可参考 #10

@mn860429
Copy link

收到

@chenjun0210
Copy link

请问代理ip在哪搞呀,有试成功得吗

@lemisky
Copy link
Member

lemisky commented Sep 18, 2021

请问代理ip在哪搞呀,有试成功得吗

就是要梯子呀,得花钱买,能找到免费的也可以

@chenjun0210
Copy link

请问代理ip在哪搞呀,有试成功得吗

就是要梯子呀,得花钱买,能找到免费的也可以

好的多谢

@ghost
Copy link

ghost commented May 20, 2022

requests.exceptions.ProxyError: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /translate_a/t?tl=th&sl=zh-cn&ie=UTF-8&oe=UTF-8&client=at&dj=1&format=html&v=1.0 (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001E9CB15AFE0>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。')))

@lemisky
Copy link
Member

lemisky commented May 20, 2022

@Json-Answer 我刚刚试了,一切正常。应该是你代理的问题,或者是用的太多,被 xxx 了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants