mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-23 17:04:12 +08:00
update tkk regularly
This commit is contained in:
parent
ddc8313d37
commit
22bb1420c1
@ -99,7 +99,7 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved
|
||||
|
||||
std::wstring GetTranslationUri(std::wstring text, unsigned TKK)
|
||||
{
|
||||
// If no TKK available, use this uri. Can't use too much or google will detect unauthorized access.
|
||||
// If no TKK available, use this uri. Can't use too much or google will detect unauthorized access
|
||||
if (!TKK) return L"/translate_a/single?client=gtx&dt=ld&dt=rm&dt=t&tl=" + translateTo + L"&q=" + text;
|
||||
|
||||
// Artikash 8/19/2018: reverse engineered from translate.google.com
|
||||
@ -155,7 +155,6 @@ bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo)
|
||||
std::wstring translation;
|
||||
if (internet)
|
||||
{
|
||||
if (!TKK)
|
||||
if (HINTERNET connection = WinHttpConnect(internet, L"translate.google.com", INTERNET_DEFAULT_HTTPS_PORT, 0))
|
||||
{
|
||||
if (HINTERNET request = WinHttpOpenRequest(connection, L"GET", L"/", NULL, NULL, NULL, WINHTTP_FLAG_SECURE))
|
||||
|
Loading…
x
Reference in New Issue
Block a user