Showing
1 changed file
with
2 additions
and
0 deletions
... | @@ -13,6 +13,7 @@ const rp = require("request-promise"); | ... | @@ -13,6 +13,7 @@ const rp = require("request-promise"); |
13 | // Api URL | 13 | // Api URL |
14 | const URL = { | 14 | const URL = { |
15 | "ETRI" : "http://aiopen.etri.re.kr:8000/", | 15 | "ETRI" : "http://aiopen.etri.re.kr:8000/", |
16 | + "Korean" : "https://search.naver.com/p/csearch/ocontent/util/SpellerProxy?_callback=&color_blindness=0&q=" | ||
16 | } | 17 | } |
17 | 18 | ||
18 | // ETRI Api Request Format | 19 | // ETRI Api Request Format |
... | @@ -53,6 +54,7 @@ apiRequest.ETRI = async ( query, argument ) => { | ... | @@ -53,6 +54,7 @@ apiRequest.ETRI = async ( query, argument ) => { |
53 | */ | 54 | */ |
54 | apiRequest.Korean = async ( text ) => { | 55 | apiRequest.Korean = async ( text ) => { |
55 | return new Promise( ( resolve,reject ) => { | 56 | return new Promise( ( resolve,reject ) => { |
57 | + | ||
56 | rp( { "uri" : URL.Korean+encodeURI( text ) } ) | 58 | rp( { "uri" : URL.Korean+encodeURI( text ) } ) |
57 | .then( ( body ) => { | 59 | .then( ( body ) => { |
58 | body = body.substring( 1, body.length - 2 ); | 60 | body = body.substring( 1, body.length - 2 ); | ... | ... |
-
Please register or login to post a comment