JSONDecodeError using Google Translate API with Python3

前端 未结 2 1781
既然无缘
既然无缘 2020-12-06 12:23

I\'ve searched thoroughly on Stack Overflow but couldn\'t find an answer to this problem. I\'m trying to use the Google Translate API (googletrans 2.2.0) for Python (3.6.2)

相关标签:
2条回答
  • 2020-12-06 13:02

    I think I may have found an answer to my own question. If I reduce the number of characters I feed to the API at once to 5k, everything seems to work fine. Strange since the Googletrans documentation says that the limit is 15k... Ah well. I will have to batch the request.

    0 讨论(0)
  • 2020-12-06 13:09

    You have to stop using googletrans until they fix it, and use translate instead :

    https://pypi.org/project/translate/

    0 讨论(0)
提交回复
热议问题