은승우

Update app.js

Showing 1 changed file with 2 additions and 2 deletions
......@@ -100,7 +100,6 @@ async function handleEvent(event) {
request.post(options, function (error, response, body) {
let jsonResponse = JSON.stringify(JSON.parse(body), null, ' ');
jsonResponse=jsonResponse.toString()
console.log(jsonResponse);
text='';
while(jsonResponse.indexOf('text')!=-1)
{
......@@ -108,7 +107,8 @@ async function handleEvent(event) {
text+=jsonResponse.substring(0,jsonResponse.indexOf("}")-1)+" ";
}
text.replace('\n',' ');
var url="https://www.genie.co.kr/search/searchLyrics?query="+ encodeURI(text);
request(url, function(error, response, html){
var $ = cheerio.load(html);
......