은승우

Update app.js

Showing 1 changed file with 3 additions and 4 deletions
......@@ -4,7 +4,7 @@ const line = require('@line/bot-sdk');
var request = require('request');
var https=require('https');
var http=require('http');
var mime=require('mime-types');
var fs = require("fs");
......@@ -105,8 +105,7 @@ async function handleEvent(event) {
};
request.post(options, function (error, response, body) {
console.log(document.getElementById(body));
console.log(mime.lookup(body));
var data= body.toString('utf-8');
var text='';
while(data.indexOf('text\\')!=-1)
......@@ -115,7 +114,7 @@ async function handleEvent(event) {
text+=data.substring(0,data.indexOf("\\"))+" ";
}
text="나의모든날들";
console.log(text);
var url="https://www.genie.co.kr/search/searchLyrics?query="+ encodeURI(text);
request(url, function(error, response, html){
var $ = cheerio.load(html);
......