Closed h1code2 closed 3 years ago
t = google_translator(url_suffix='cn',timeout=10)
text = "https://www.hkcnews.com"
text_trans = t.translate(text,lang_tgt='en',lang_src='zh')
print(text_trans)
->Https://oooooooo. and KC news.com
I only can use url_suffix="cn", so i can't make this error =。=
I have fixed this problem. You can try to use the newest version. : )
you are awesome!
When I am using the code, url_suffix="com" Translated content: https://www.hkcnews.com It will pop up the following error: ` Traceback (most recent call last): File "C:\Users\xxx\Envs\xxx_venv\lib\site-packages\google_trans_new\google_trans_new.py", line 153, in translate pronounce_src = (response[0][0]) TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred: `