GithubHelp home page GithubHelp logo

sunhailin-leo / deepl-translator-api Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 4.0 13 KB

Maybe is the best unofficial api of DeepL translator.

Home Page: https://www.deepl.com/translator

License: MIT License

Python 97.62% Batchfile 1.19% Shell 1.19%

deepl-translator-api's Introduction

Hello 👋

Welcome to my GitHub profile. Some info about me:

profile-views

deepl-translator-api's People

Contributors

sunhailin-leo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

deepl-translator-api's Issues

sentence_example.py Exception

Your example generate a error.

Traceback (most recent call last):
  File "test.py", line 46, in <module>
    sentences_translate_example_en_to_zh()
  File "test.py", line 24, in sentences_translate_example_en_to_zh
    result = DeepLTranslator(
  File "pydeeplator\deepL.py", line 117, in translate
    return self._translate_sentences()
  File "pydeeplator\deepL.py", line 161, in _translate_sentences
    return self._prepare_call_translate_api(job_dict_list=job_dict_list, lang=lang)
  File "pydeeplator\deepL.py", line 178, in _prepare_call_translate_api
    translate_result = self._core_request(request_data=translate_data)
  File "pydeeplator\deepL.py", line 199, in _core_request
    raise Exception("API 不可用!")
Exception: API 不可用!

Process finished with exit code 1

sentences_example.py Exception: API 不可用!

python .\sentences_example.py

{'result': 'It was a beautiful day and I went hiking with Xiao Ming.We met Little Red in the mountains and happily wrote code together.'}
Traceback (most recent call last):
File ".\sentences_example.py", line 46, in
sentences_translate_example_en_to_zh()
File ".\sentences_example.py", line 27, in sentences_translate_example_en_to_zh
translate_mode=TranslateModeType.SENTENCES,
File "C:\Users\xiagw\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pydeeplator\deepL.py", line 117, in translate
return self._translate_sentences()
File "C:\Users\xiagw\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pydeeplator\deepL.py", line 161, in _translate_sentences
return self._prepare_call_translate_api(job_dict_list=job_dict_list, lang=lang)
File "C:\Users\xiagw\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pydeeplator\deepL.py", line 178, in _prepare_call_translate_api
translate_result = self._core_request(request_data=translate_data)
File "C:\Users\xiagw\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pydeeplator\deepL.py", line 199, in _core_request
raise Exception("API 不可用!")
Exception: API 不可用!

it work !!

I have some issue now some time i have return

translate_mode=TranslateModeType.WORD,
File "/home/hebergement/.local/lib/python3.6/site-packages/pydeeplator/deepL.py", line 119, in translate
return self._translate_word()
File "/home/hebergement/.local/lib/python3.6/site-packages/pydeeplator/deepL.py", line 135, in _translate_word
job_dict_list=job_dict_list, lang="auto"
File "/home/hebergement/.local/lib/python3.6/site-packages/pydeeplator/deepL.py", line 178, in _prepare_call_translate_api
translate_result = self._core_request(request_data=translate_data)
File "/home/hebergement/.local/lib/python3.6/site-packages/pydeeplator/deepL.py", line 199, in _core_request
raise Exception("API 不可用!")
Exception: API 不可用!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.