Toggle navigation
Toggle navigation
This project
Loading...
Sign in
은승우
/
LINEBOT
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
은승우
2019-12-05 19:56:56 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
70522602c58a7f86260afcd0574b1806e2cb30cc
70522602
1 parent
22ec34e4
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
app.js
app.js
View file @
7052260
...
...
@@ -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
);
...
...
Please
register
or
login
to post a comment