From ad3f09d8efe2f4be3379ee3e54fc5c22ab9482f8 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sat, 1 Jan 2022 21:58:04 -0700 Subject: [PATCH] bing api update --- extensions/bingtranslate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/bingtranslate.cpp b/extensions/bingtranslate.cpp index 0f9f831..2722b85 100644 --- a/extensions/bingtranslate.cpp +++ b/extensions/bingtranslate.cpp @@ -233,7 +233,7 @@ std::pair Translate(const std::wstring& text, TranslationPar L"Mozilla/5.0 Textractor", L"www.bing.com", L"POST", - FormatString(L"/ttranslatev3?fromLang=%s&to=%s&text=%s%s%d", codes.at(tlp.translateFrom), codes.at(tlp.translateTo), Escape(text), token.Copy(), i++).c_str() + FormatString(L"/ttranslatev3?fromLang=%s&to=%s&text=%s%s.%d", codes.at(tlp.translateFrom), codes.at(tlp.translateTo), Escape(text), token.Copy(), i++).c_str() }) if (auto translation = Copy(JSON::Parse(httpRequest.response)[0][L"translations"][0][L"text"].String())) return { true, translation.value() }; else return { false, FormatString(L"%s (token=%s): %s", TRANSLATION_ERROR, std::exchange(token.Acquire().contents, L""), httpRequest.response) };