Showing
1 changed file
with
3 additions
and
10 deletions
... | @@ -85,7 +85,6 @@ async function handleEvent(event) { | ... | @@ -85,7 +85,6 @@ async function handleEvent(event) { |
85 | var cheerio = require('cheerio'); | 85 | var cheerio = require('cheerio'); |
86 | var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'; | 86 | var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'; |
87 | var imageUrl=event.message.text; | 87 | var imageUrl=event.message.text; |
88 | - console.log(imageUrl); | ||
89 | var options = { | 88 | var options = { |
90 | uri: uriBase, | 89 | uri: uriBase, |
91 | qs: { | 90 | qs: { |
... | @@ -108,6 +107,7 @@ async function handleEvent(event) { | ... | @@ -108,6 +107,7 @@ async function handleEvent(event) { |
108 | data=data.substring(data.indexOf('text\\')+9); | 107 | data=data.substring(data.indexOf('text\\')+9); |
109 | text+=data.substring(0,data.indexOf("\\"))+" "; | 108 | text+=data.substring(0,data.indexOf("\\"))+" "; |
110 | } | 109 | } |
110 | + text="나의모든날들"; | ||
111 | var url="https://www.genie.co.kr/search/searchLyrics?query="+ encodeURI(text); | 111 | var url="https://www.genie.co.kr/search/searchLyrics?query="+ encodeURI(text); |
112 | request(url, function(error, response, html){ | 112 | request(url, function(error, response, html){ |
113 | var $ = cheerio.load(html); | 113 | var $ = cheerio.load(html); |
... | @@ -132,16 +132,9 @@ async function handleEvent(event) { | ... | @@ -132,16 +132,9 @@ async function handleEvent(event) { |
132 | client.replyMessage(event.replyToken,result).then(resolve).catch(reject); | 132 | client.replyMessage(event.replyToken,result).then(resolve).catch(reject); |
133 | }); | 133 | }); |
134 | }); | 134 | }); |
135 | - | ||
136 | - | ||
137 | - | ||
138 | - | ||
139 | - }); | ||
140 | - } | ||
141 | - ); | ||
142 | 135 | ||
143 | - | 136 | + }); |
144 | - }); | 137 | + |
145 | } | 138 | } |
146 | else if(event.type == 'message' && event.message.type == 'text') | 139 | else if(event.type == 'message' && event.message.type == 'text') |
147 | { | 140 | { | ... | ... |
-
Please register or login to post a comment