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 01:29:25 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9c3afe1db48c6931891671f0b4d657c8fa45eae5
9c3afe1d
1 parent
11bc6955
update app.js
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
app.js
mymusic.js
app.js
View file @
9c3afe1
...
...
@@ -120,7 +120,7 @@ function handleEvent(event)
// ignore non-text-message event
return
Promise
.
resolve
(
null
);
}
else
if
(
event
.
message
.
text
.
substring
(
0
,
5
)
==
'
순위
보기'
)
else
if
(
event
.
message
.
text
.
substring
(
0
,
5
)
==
'
차트
보기'
)
{
// music list 출력
var
url
=
"https://www.genie.co.kr/chart/top200"
;
...
...
@@ -160,8 +160,16 @@ function handleEvent(event)
}
else
if
(
event
.
message
.
text
.
substring
(
0
,
5
)
==
'가사 검색'
)
{
/*
if(songList[0]==undefined)
{
var result = { type: 'text', text:''};
result.text=""
client.replyMessage(event.replyToken, result);
}
*/
var
userNum
=
event
.
message
.
text
[
6
]
var
newUrl
=
songList
[
userNum
].
url
;
var
newUrl
=
songList
[
userNum
-
1
].
url
;
var
lyric
=
''
;
request
(
newUrl
,
function
(
error
,
response
,
html
)
...
...
mymusic.js
View file @
9c3afe1
...
...
@@ -58,3 +58,9 @@ request(url, function(error, response, html)
console
.
log
(
lyric
);
});
})
if
(
songList
[
0
]
==
undefined
)
{
console
.
log
(
"hhh"
);
}
console
.
log
(
songList
[
0
]);
\ No newline at end of file
...
...
Please
register
or
login
to post a comment