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:33:34 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
043fa5d79669e255de348e46cd2849bd1a48f8cd
043fa5d7
1 parent
f6ebaf0b
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
app.js
app.js
View file @
043fa5d
...
...
@@ -100,15 +100,13 @@ async function handleEvent(event) {
request
.
post
(
options
,
function
(
error
,
response
,
body
)
{
let
jsonResponse
=
JSON
.
stringify
(
JSON
.
parse
(
body
),
null
,
' '
);
console
.
log
(
jsonResponse
);
var
text
=
''
;
while
(
jsonResponse
.
indexOf
(
'text\\'
)
!=-
1
)
{
data
=
data
.
substring
(
data
.
indexOf
(
'text\\'
)
+
9
);
text
+=
data
.
substring
(
0
,
data
.
indexOf
(
"\\"
))
+
" "
;
}
console
.
log
(
text
);
var
url
=
"https://www.genie.co.kr/search/searchLyrics?query="
+
encodeURI
(
text
);
console
.
log
(
url
);
request
(
url
,
function
(
error
,
response
,
html
){
var
$
=
cheerio
.
load
(
html
);
const
$bodyList
=
$
(
'#body-content > div.search_lyrics > div.music-list-wrap.type-lyrics > table > tbody > tr'
);
...
...
Please
register
or
login
to post a comment