Open sueye1990 opened 6 years ago
你好! 我试了这段code: from translation import google, ConnectError try: print(google('hello world!', dst = 'zh-CN', proxies = {'http': '127.0.0.1:1080'})) except ConnectError: print('Invaild proxy') 但是总是出现ConnectionRefusedError。请问是为什么呢?proxy 不对吗? 我试这段 from translation import baidu, google, youdao, iciba print(google('hello world!', dst = 'zh-CN')) print(google('hello world!', dst = 'ru')) print(baidu('hello world!', dst = 'zh')) print(baidu('hello world!', dst = 'ru')) print(youdao('hello world!', dst = 'zh-CN')) print(iciba('hello world!', dst = 'zh')) print(bing('hello world!', dst = 'zh-CHS')) 则出现TranslateError, 您知道为什么吗? 提前感谢您的回答!
你好! 我试了这段code: from translation import google, ConnectError try: print(google('hello world!', dst = 'zh-CN', proxies = {'http': '127.0.0.1:1080'})) except ConnectError: print('Invaild proxy') 但是总是出现ConnectionRefusedError。请问是为什么呢?proxy 不对吗? 我试这段 from translation import baidu, google, youdao, iciba print(google('hello world!', dst = 'zh-CN')) print(google('hello world!', dst = 'ru')) print(baidu('hello world!', dst = 'zh')) print(baidu('hello world!', dst = 'ru')) print(youdao('hello world!', dst = 'zh-CN')) print(iciba('hello world!', dst = 'zh')) print(bing('hello world!', dst = 'zh-CHS')) 则出现TranslateError, 您知道为什么吗? 提前感谢您的回答!