matheuss / google-translate-api

A free and unlimited API for Google Translate :dollar::no_entry_sign:
https://npmjs.com/package/google-translate-api
MIT License
2.91k stars 608 forks source link

Cant' get result google-translate #96

Closed yamatakau08 closed 5 years ago

yamatakau08 commented 5 years ago

I'm` using google-translate-20190206.1229 from elpa in my company's proxy environment.

Since I don't get the translate result of google-translate, I set (setq url-debug t) to put out debug message of url.el which google-translate use.

The following is URL-DEBUG of url.el.

Could you advice me what is wrong?

■ my environment (emacs-version) "GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2019-02-25" self build google-translate-20190206.1229 url-proxy-services (("http" . "proxy.foo.co.jp:8080") ("https" . "proxy.foo.jp:8080"))

■ URL-DEBUG

http -> Contacting host: translate.google.com:80
http -> Marking connection as busy: translate.google.com:80 #<process translate.google.com>
http -> Request is:
GET http://translate.google.com/ HTTP/1.1
MIME-Version: 1.0
Connection: close
Extension: Security/Digest Security/SSL
Host: translate.google.com
Accept-encoding: gzip
Accept-charset: shift_jis;q=1, euc-jp;q=0.5, iso-2022-jp;q=0.5, euc-jis-2004;q=0.5, iso-2022-jp-2004;q=0.5, iso-8859-1;q=0.5, utf-8;q=0.5, big5;q=0.5, iso-2022-jp-2;q=0.5, gb2312;q=0.5, euc-tw;q=0.5, euc-kr;q=0.5, us-ascii;q=0.5, utf-7;q=0.5, hz-gb-2312;q=0.5, big5-hkscs;q=0.5, gbk;q=0.5, gb18030;q=0.5, iso-8859-5;q=0.5, koi8-r;q=0.5, koi8-u;q=0.5, cp866;q=0.5, koi8-t;q=0.5, windows-1251;q=0.5, cp855;q=0.5, iso-8859-2;q=0.5, iso-8859-3;q=0.5, iso-8859-4;q=0.5, iso-8859-9;q=0.5, iso-8859-10;q=0.5, iso-8859-13;q=0.5, iso-8859-14;q=0.5, iso-8859-15;q=0.5, windows-1250;q=0.5, windows-1252;q=0.5, windows-1254;q=0.5, windows-1257;q=0.5, cp775;q=0.5, cp850;q=0.5, cp852;q=0.5, cp857;q=0.5, cp858;q=0.5, cp860;q=0.5, cp861;q=0.5, cp863;q=0.5, cp865;q=0.5, cp437;q=0.5, macintosh;q=0.5, next;q=0.5, hp-roman8;q=0.5, adobe-standard-encoding;q=0.5, iso-8859-16;q=0.5, iso-8859-7;q=0.5, windows-1253;q=0.5, cp737;q=0.5, cp851;q=0.5, cp869;q=0.5, iso-8859-8;q=0.5, windows-1255;q=0.5, cp862;q=0.5, cp874;q=0.5, iso-8859-11;q=0.5, viscii;q=0.5, windows-1258;q=0.5, iso-8859-6;q=0.5, windows-1256;q=0.5, iso-2022-cn;q=0.5, iso-2022-cn-ext;q=0.5, iso-2022-kr;q=0.5, utf-16le;q=0.5, utf-16be;q=0.5, utf-16;q=0.5, x-ctext;q=0.5
Accept: */*
User-Agent: URL/Emacs Emacs/26.1 (Windows-NT; 32bit; x86_64-w64-mingw32)
Cookie: NID=180=R56xSt3GgckSDGxmTChqKxrm5u_N2VyvOTYuAhj2gp5MrGq1xi9YkggIsi9_v3nkU28ocLLwJQ3kPHFRWIEiJKjkp1AObrBhF2x8mV45FSZaDTexvNLN9DvRNuaodqiUQXH-BVEWEtkldCBNbWgkTQED2rT-eZEgFEKPU8J_Ee4
Connection: close

retrieval -> Spinning in url-retrieve-synchronously: nil (#<buffer  *http translate.google.com:80*>)
http -> Calling after change function `url-http-wait-for-headers-change-function' for `#<process translate.google.com>'
http -> url-http-wait-for-headers-change-function ( *http translate.google.com:80*)
http -> Saw end of headers... ( *http translate.google.com:80*)
http -> url-http-parse-response called in ( *http translate.google.com:80*)
http -> Got a content-length, being smart about document end.
http -> Calling initial content-length for extra data at end of headers
http -> Marking connection as free: translate.google.com:80 #<process translate.google.com>
http -> url-http-parse-headers called in ( *http translate.google.com:80*)
http -> url-http-parse-response called in ( *http translate.google.com:80*)
http -> Parsed HTTP headers: class=3 status=302
http -> Contacting host: translate.google.com:443
http -> Marking connection as busy: translate.google.com:443 #<process translate.google.com>
http -> Finished parsing HTTP headers: nil
http -> Spinning waiting for headers...
retrieval -> Spinning in url-retrieve-synchronously: nil (#<buffer  *http translate.google.com:80*>)
retrieval -> Spinning in url-retrieve-synchronously: nil (#<buffer  *http translate.google.com:443*>)
http -> Calling after change function `url-https-proxy-after-change-function' for `#<process translate.google.com>'
http -> url-http-parse-response called in ( *http translate.google.com:443*)
http -> Request is:
GET https://translate.google.com/ HTTP/1.1
MIME-Version: 1.0
Connection: close
Extension: Security/Digest Security/SSL
Host: translate.google.com
Accept-encoding: gzip
Accept-charset: shift_jis;q=1, euc-jp;q=0.5, iso-2022-jp;q=0.5, euc-jis-2004;q=0.5, iso-2022-jp-2004;q=0.5, iso-8859-1;q=0.5, utf-8;q=0.5, big5;q=0.5, iso-2022-jp-2;q=0.5, gb2312;q=0.5, euc-tw;q=0.5, euc-kr;q=0.5, us-ascii;q=0.5, utf-7;q=0.5, hz-gb-2312;q=0.5, big5-hkscs;q=0.5, gbk;q=0.5, gb18030;q=0.5, iso-8859-5;q=0.5, koi8-r;q=0.5, koi8-u;q=0.5, cp866;q=0.5, koi8-t;q=0.5, windows-1251;q=0.5, cp855;q=0.5, iso-8859-2;q=0.5, iso-8859-3;q=0.5, iso-8859-4;q=0.5, iso-8859-9;q=0.5, iso-8859-10;q=0.5, iso-8859-13;q=0.5, iso-8859-14;q=0.5, iso-8859-15;q=0.5, windows-1250;q=0.5, windows-1252;q=0.5, windows-1254;q=0.5, windows-1257;q=0.5, cp775;q=0.5, cp850;q=0.5, cp852;q=0.5, cp857;q=0.5, cp858;q=0.5, cp860;q=0.5, cp861;q=0.5, cp863;q=0.5, cp865;q=0.5, cp437;q=0.5, macintosh;q=0.5, next;q=0.5, hp-roman8;q=0.5, adobe-standard-encoding;q=0.5, iso-8859-16;q=0.5, iso-8859-7;q=0.5, windows-1253;q=0.5, cp737;q=0.5, cp851;q=0.5, cp869;q=0.5, iso-8859-8;q=0.5, windows-1255;q=0.5, cp862;q=0.5, cp874;q=0.5, iso-8859-11;q=0.5, viscii;q=0.5, windows-1258;q=0.5, iso-8859-6;q=0.5, windows-1256;q=0.5, iso-2022-cn;q=0.5, iso-2022-cn-ext;q=0.5, iso-2022-kr;q=0.5, utf-16le;q=0.5, utf-16be;q=0.5, utf-16;q=0.5, x-ctext;q=0.5
Accept: */*
User-Agent: URL/Emacs Emacs/26.1 (Windows-NT; 32bit; x86_64-w64-mingw32)
Cookie: NID=180=R56xSt3GgckSDGxmTChqKxrm5u_N2VyvOTYuAhj2gp5MrGq1xi9YkggIsi9_v3nkU28ocLLwJQ3kPHFRWIEiJKjkp1AObrBhF2x8mV45FSZaDTexvNLN9DvRNuaodqiUQXH-BVEWEtkldCBNbWgkTQED2rT-eZEgFEKPU8J_Ee4
Connection: close

retrieval -> Spinning in url-retrieve-synchronously: nil (#<buffer  *http translate.google.com:443*>)
retrieval -> Spinning in url-retrieve-synchronously: nil (#<buffer  *http translate.google.com:443*>)
retrieval -> Spinning in url-retrieve-synchronously: nil (#<buffer  *http translate.google.com:443*>)
retrieval -> Spinning in url-retrieve-synchronously: nil (#<buffer  *http translate.google.com:443*>)
retrieval -> Spinning in url-retrieve-synchronously: nil (#<buffer  *http translate.google.com:443*>)
...
yamatakau08 commented 5 years ago

■ my environment (emacs-version) "GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2019-02-25" self build

I tried with emacs binary same as the abover which I get from GNU ftp server. It works fine. No problem. So I close this issue.