yihong0618 / bilingual_book_maker

Make bilingual epub books Using AI translate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

deepl翻译只读取,不翻译

yangchen859 opened this issue · comments

这是我在rapidapi测试, 是能够翻译的
image

我使用的是这个命令, 不太确定是不是这样使用python make_book.py --book_name test_books/animal_farm.epub --model deepl --deepl_key 5a1745ee92xxxsh16xxxxxxxxxxp1563fejsn2347d9025e6f --language ja 这个命令时, 翻译只能读取到文本, 但是不会翻译

image

发现问题: deepl_translator.py 中
self.headers = { "content-type": "application/json", "X-RapidAPI-Key": "", "X-RapidAPI-Host": "deepl-translator.p.rapidapi.com", }
替换为
self.headers = { "content-type": "application/json", "X-RapidAPI-Key": "", "X-RapidAPI-Host": "dpl-translator.p.rapidapi.com", }
就可以翻译了

发现问题: deepl_translator.py 中 self.headers = { "content-type": "application/json", "X-RapidAPI-Key": "", "X-RapidAPI-Host": "deepl-translator.p.rapidapi.com", } 替换为 self.headers = { "content-type": "application/json", "X-RapidAPI-Key": "", "X-RapidAPI-Host": "dpl-translator.p.rapidapi.com", } 就可以翻译了

来个 pr?

发现问题: deepl_translator.py 中 self.headers = { "content-type": "application/json", "X-RapidAPI-Key": "", "X-RapidAPI-Host": "deepl-translator.p.rapidapi.com", } 替换为 self.headers = { "content-type": "application/json", "X-RapidAPI-Key": "", "X-RapidAPI-Host": "dpl-translator.p.rapidapi.com", } 就可以翻译了

你这俩没区别啊

有区别,我**了

@yangchen859 按照你的代码 fix 了,在 commit 里面加了感谢,谢谢你