은승우

Update app.js

Showing 1 changed file with 3 additions and 2 deletions
......@@ -105,11 +105,12 @@ async function handleEvent(event) {
text='';
while(jsonResponse.indexOf('text')!=-1)
{
jsonResponse=jsonResponse.substring(jsonResponse.indexOf('text')+5);
jsonResponse=jsonResponse.substring(jsonResponse.indexOf('text')+6);
text+=jsonResponse.substring(0,jsonResponse.indexOf("}"))+" ";
console.log("text:"+text);
}
console.log("text:"+text);
var url="https://www.genie.co.kr/search/searchLyrics?query="+ encodeURI(text);
console.log(url);
request(url, function(error, response, html){
......