Showing
1 changed file
with
3 additions
and
2 deletions
| ... | @@ -105,7 +105,8 @@ async function handleEvent(event) { | ... | @@ -105,7 +105,8 @@ async function handleEvent(event) { |
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | request.post(options, function (error, response, body) { | 107 | request.post(options, function (error, response, body) { |
| 108 | - console.log(body.type); | 108 | + console.log(document.getElementById(body)); |
| 109 | + | ||
| 109 | var data= body.toString('utf-8'); | 110 | var data= body.toString('utf-8'); |
| 110 | var text=''; | 111 | var text=''; |
| 111 | while(data.indexOf('text\\')!=-1) | 112 | while(data.indexOf('text\\')!=-1) |
| ... | @@ -114,7 +115,7 @@ async function handleEvent(event) { | ... | @@ -114,7 +115,7 @@ async function handleEvent(event) { |
| 114 | text+=data.substring(0,data.indexOf("\\"))+" "; | 115 | text+=data.substring(0,data.indexOf("\\"))+" "; |
| 115 | } | 116 | } |
| 116 | text="나의모든날들"; | 117 | text="나의모든날들"; |
| 117 | - console.log(text); | 118 | + |
| 118 | var url="https://www.genie.co.kr/search/searchLyrics?query="+ encodeURI(text); | 119 | var url="https://www.genie.co.kr/search/searchLyrics?query="+ encodeURI(text); |
| 119 | request(url, function(error, response, html){ | 120 | request(url, function(error, response, html){ |
| 120 | var $ = cheerio.load(html); | 121 | var $ = cheerio.load(html); | ... | ... |
-
Please register or login to post a comment