mirror of
https://github.com/SqrtMinusOne/reverso.el.git
synced 2025-12-10 07:43:03 +03:00
fix: add workaround for the translation API
Some checks failed
melpazoid / build (push) Has been cancelled
Some checks failed
melpazoid / build (push) Has been cancelled
This commit is contained in:
parent
ecea6f2c66
commit
40ed3d83c4
1 changed files with 12 additions and 3 deletions
15
reverso.el
15
reverso.el
|
|
@ -344,10 +344,19 @@ The result is an alist with the following keys:
|
||||||
(origin . "reversomobile")
|
(origin . "reversomobile")
|
||||||
(sentenceSpliiter . :json-false)))
|
(sentenceSpliiter . :json-false)))
|
||||||
(to . ,(alist-get target reverso--language-mapping))))
|
(to . ,(alist-get target reverso--language-mapping))))
|
||||||
:headers `(("Content-Type" . "application/json")
|
:headers `(("Accept" . "application/json, text/plain, */*")
|
||||||
("Accept" . "*/*")
|
("Accept-Language" . "en-US,en;q=0.5")
|
||||||
("Connection" . "keep-alive")
|
("Connection" . "keep-alive")
|
||||||
("User-Agent" . ,reverso--user-agent))
|
("Content-Type" . "application/json")
|
||||||
|
("Host" . "api.reverso.net")
|
||||||
|
("Origin" . "https://www.reverso.net")
|
||||||
|
("Referer" . "https://www.reverso.net")
|
||||||
|
("Sec-Fetch-Dest" . "empty")
|
||||||
|
("Sec-Fetch-Mode" . "cors")
|
||||||
|
("Sec-Fetch-Site" . "same-site")
|
||||||
|
("TE" . "trailers")
|
||||||
|
("User-Agent" . ,reverso--user-agent)
|
||||||
|
("X-Reverso-Origin" . "translation.web"))
|
||||||
:parser 'json-read
|
:parser 'json-read
|
||||||
:encoding 'utf-8
|
:encoding 'utf-8
|
||||||
:success (cl-function
|
:success (cl-function
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue