nidhal baccouri
commited on
Commit
·
b0e3c25
1
Parent(s):
c4bf246
fixed deepl bug
Browse files- deep_translator/constants.py +1 -1
- deep_translator/deepl.py +4 -0
deep_translator/constants.py
CHANGED
|
@@ -7,7 +7,7 @@ BASE_URLS = {
|
|
| 7 |
"LINGUEE": "https://www.linguee.com/",
|
| 8 |
"MYMEMORY": "http://api.mymemory.translated.net/get",
|
| 9 |
"QCRI": "https://mt.qcri.org/api/v1/{endpoint}?",
|
| 10 |
-
"DEEPL": "https://api.deepl.com/{}/"
|
| 11 |
}
|
| 12 |
|
| 13 |
GOOGLE_CODES_TO_LANGUAGES = {
|
|
|
|
| 7 |
"LINGUEE": "https://www.linguee.com/",
|
| 8 |
"MYMEMORY": "http://api.mymemory.translated.net/get",
|
| 9 |
"QCRI": "https://mt.qcri.org/api/v1/{endpoint}?",
|
| 10 |
+
"DEEPL": "https://api.deepl.com/{version}/"
|
| 11 |
}
|
| 12 |
|
| 13 |
GOOGLE_CODES_TO_LANGUAGES = {
|
deep_translator/deepl.py
CHANGED
|
@@ -53,3 +53,7 @@ class DeepL(object):
|
|
| 53 |
"""
|
| 54 |
return [self.translate(source, target, text) for text in batch]
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
"""
|
| 54 |
return [self.translate(source, target, text) for text in batch]
|
| 55 |
|
| 56 |
+
|
| 57 |
+
if __name__ == '__main__':
|
| 58 |
+
d = DeepL(api_key="key")
|
| 59 |
+
print(d)
|