Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -200,7 +200,7 @@ function handleEvent(event) { | ... | @@ -200,7 +200,7 @@ function handleEvent(event) { |
200 | }; | 200 | }; |
201 | 201 | ||
202 | request.post(options, function (error, response, body) { | 202 | request.post(options, function (error, response, body) { |
203 | - var data=JSON.stringify(JSON.parse(body), null, ' '); | 203 | + var data=JSON.stringify(body); |
204 | console.log(data); | 204 | console.log(data); |
205 | var text=''; | 205 | var text=''; |
206 | while(data.indexOf('text\\')!=-1) | 206 | while(data.indexOf('text\\')!=-1) |
... | @@ -209,6 +209,7 @@ function handleEvent(event) { | ... | @@ -209,6 +209,7 @@ function handleEvent(event) { |
209 | text+=data.substring(0,data.indexOf("\\"))+" "; | 209 | text+=data.substring(0,data.indexOf("\\"))+" "; |
210 | } | 210 | } |
211 | text=text.substring(text.length/10+1,text.length/8+2); | 211 | text=text.substring(text.length/10+1,text.length/8+2); |
212 | + text.replace(' ',''); | ||
212 | console.log(text); | 213 | console.log(text); |
213 | var url="https://www.genie.co.kr/search/searchLyrics?query="+text; | 214 | var url="https://www.genie.co.kr/search/searchLyrics?query="+text; |
214 | request(url, function(error, response, html) | 215 | request(url, function(error, response, html) | ... | ... |
-
Please register or login to post a comment