@
bjzhush 你使用的是网页版吗? 如果你用的是 cli 版本,可以告知一下吗?
我尝试使用 cli 版本(这个
https://github.com/lushan88a/google_trans_new )。
没有跑起来:
Traceback (most recent call last):
File "/home/telink/.local/lib/python3.7/site-packages/google_trans_new/
google_trans_new.py", line 189, in translate
r.raise_for_status()
File "/usr/local/python3/lib/python3.7/site-packages/requests/
models.py", line 1021, in raise_for_status
raise HTTPError( http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url:
https://translate.google.cn/_/TranslateWebserverUi/data/batchexecuteDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "
tran.py", line 41, in <module>
raise e
File "
tran.py", line 38, in <module>
results = pool.map(request, texts)
File "/usr/local/python3/lib/python3.7/multiprocessing/
pool.py", line 268, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/local/python3/lib/python3.7/multiprocessing/
pool.py", line 657, in get
raise self._value
File "/usr/local/python3/lib/python3.7/multiprocessing/
pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/usr/local/python3/lib/python3.7/multiprocessing/
pool.py", line 44, in mapstar
return list(map(*args))
File "
tran.py", line 26, in request
translate_text = t.translate(text.strip(), lang)
File "/home/telink/.local/lib/python3.7/site-packages/google_trans_new/
google_trans_new.py", line 194, in translate
raise google_new_transError(tts=self, response=r)
google_trans_new.google_trans_new.google_new_transError: 404 (Not Found) from TTS API. Probable cause: Unknown