I'm trying to use Jim Breen's WWWJDIC server backdoor entry/api to query example sentences via indexed Japanese words, but my requests keep getting 500 internal server errors.
The API details can be found here: .html#backdoor_tag
Here is the code I'm using to make my GET request:
var lookupword = "辛い";
var kana = "からい";
// dictionary to use (1 = EDICT)
var n = 1;
// backdoor entry (Z = raw dictionary display)
var M = "Z";
// search type (E = example sentences via indexed Japanese words)
var t = "E";
// key type (U = UTF8, followed by "lookupword=n=kana=")
var k = $"U{System.Net.WebUtility.UrlEncode(lookupword)}=1={System.Net.WebUtility.UrlEncode(kana)}=";
var url = $"?{n}{M}{t}{k}";
using (var client = new HttpClient())
{
var request = await client.GetAsync(url);
var response = await request.Content.ReadAsStringAsync();
Console.WriteLine(response);
}
Here is the url
for the example above: =%E3%81%8B%E3%82%89%E3%81%84=
I'm trying to use Jim Breen's WWWJDIC server backdoor entry/api to query example sentences via indexed Japanese words, but my requests keep getting 500 internal server errors.
The API details can be found here: https://www.edrdg./wwwjdic/wwwjdicinf.html#backdoor_tag
Here is the code I'm using to make my GET request:
var lookupword = "辛い";
var kana = "からい";
// dictionary to use (1 = EDICT)
var n = 1;
// backdoor entry (Z = raw dictionary display)
var M = "Z";
// search type (E = example sentences via indexed Japanese words)
var t = "E";
// key type (U = UTF8, followed by "lookupword=n=kana=")
var k = $"U{System.Net.WebUtility.UrlEncode(lookupword)}=1={System.Net.WebUtility.UrlEncode(kana)}=";
var url = $"https://www.edrdg./cgi-bin/wwwjdic/wwwjdic?{n}{M}{t}{k}";
using (var client = new HttpClient())
{
var request = await client.GetAsync(url);
var response = await request.Content.ReadAsStringAsync();
Console.WriteLine(response);
}
Here is the url
for the example above: https://www.edrdg./cgi-bin/wwwjdic/wwwjdic?1ZEU%E8%BE%9B%E3%81%84=1=%E3%81%8B%E3%82%89%E3%81%84=
1 Answer
Reset to default 0I contacted Mr. Breen who said this may have been a bug.
They've updated the API and doco at https://www.edrdg./wwwjdic/wwwjdicinf.html#backdoor_tag, and the keytype lookupword=n=kana=
has been replaced with lookupword|n|kana|
.
I can now query example sentences using this URL format: https://www.edrdg./cgi-bin/wwwjdic/wwwjdic?1ZEUlookupword|n|kana|
For example: https://www.edrdg./cgi-bin/wwwjdic/wwwjdic?1ZEU%E8%BE%9B%E3%81%84|1|%E3%81%8B%E3%82%89%E3%81%84|