-
Notifications
You must be signed in to change notification settings - Fork 743
Open
Description
Before submitting, please confirm that:
- I am using async/await syntax (non-sync calls are not supported since 4.0.0)
- This is not a rate-limiting issue or about exceeding the 15k character limit (Google's rate limits are not a library bug)
- I have checked the README for basic usage, known limitations, and have searched existing issues
Googletrans version
4.0.1+
Issue Type
Bug Report
Current Behavior
code:
import asyncio
from googletrans import Translator
translator = Translator()
async def main():
text = 'How `this` works in JavaScript (spoiler: nobody really knows)'
result = await translator.translate(text, src='en', dest='zh-cn')
print(result.text)
asyncio.run(main())output:
````this''在javaScript中起作用(剧透:没人知道)
expected output:
`this`在javaScript中起作用(剧透:没人知道)
That is, The translated text has an additional prefix: "```"
But translate.google.com is ok:
Expected Behavior
expected output:
`this''在javaScript中起作用(剧透:没人知道)
Steps to Reproduce
No response
Related Code
No response
Other Information
No response
Metadata
Metadata
Assignees
Labels
No labels