我試圖從西班牙2個大文件,此代碼翻譯成英文: 進口goslategoslate從西班牙語翻譯成英文HTTP錯誤
big_files = ['lenin.txt', 'liga.txt']
gs = goslate.Goslate()
translation = []
for big_file in big_files:
with open(big_file, 'r') as f:
translated_lines = []
for line in f:
translated_line = gs.translate(line, "en")
translated_lines.append(translated_line)
translation.append('\n'.join(translated_lines))
我收到此錯誤:
File "C:\Anaconda\lib\urllib\request.py", line 590, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp)
HTTPError: Service Unavailable
這是否意味着我必須將庫更改爲Google Cloud Translate? – anitasp