Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Chat_Bot
/
KaKao_ChatBot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
윤준현
2018-12-04 21:40:35 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
426dab717948e8437f30a01c5ecba65d0f91fd44
426dab71
1 parent
318f73fb
adding yorusika
not complete, proceeding
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
38 deletions
app.js
app.js
View file @
426dab7
...
...
@@ -49,6 +49,9 @@ app.post('/message', function(req,res){
callback
(
null
,
yonezu
)
});
break
;
case
'ヨルシカ-Discography'
:
singer
=
'yorusika'
;
break
default
:
if
(
singer
==
'Reol'
){
crawlReol
.
crawl_Reol
(
'https://namu.wiki/w/%EB%A0%88%EC%98%A4%EB%A3%A8/%EC%9D%8C%EB%B0%98#toc'
,
function
(
Reol
){
...
...
@@ -60,6 +63,9 @@ app.post('/message', function(req,res){
callback
(
null
,
yonezu
)
});
}
else
if
(
singer
==
'yorusika'
){
}
else
callback
(
null
,
null
);
break
;
...
...
@@ -126,65 +132,108 @@ app.post('/message', function(req,res){
}
}
break
;
case
discography
[
0
].
json_album
[
index
]:
var
album
=
'앨범 : '
+
discography
[
0
].
json_album
[
index
].
substr
(
3
);
if
(
singer
==
'Reol'
){
/// 米津玄師 ///
case
'米津玄師'
:
send
=
{
'message'
:
{
'text'
:
album
+
'\n발매년도 : '
+
discography
[
0
].
json_year
[
index
]
+
'\n수록곡 : \n'
+
discography
[
0
].
json_track
[
index
]
'message'
:
{
'text'
:
'이름 : 米津玄師(Yonezu Kenshi) \n성별 : 남성 \n생년월일 : 1991년 3월 10일 \n혈액형 : O형'
,
'photo'
:
{
'url'
:
'http://reissuerecords.net/rr/wp-content/uploads/flamingo_photo2.jpg'
,
'width'
:
1000
,
'height'
:
667
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'Reol-Discography'
,
'초기화면'
]
}
'message_button'
:
{
'label'
:
'공식 홈페이지'
,
'url'
:
"http://reissuerecords.net/"
}
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'米津玄師-Discography'
]
}
else
if
(
singer
==
'Yonezu'
){
};
break
;
case
'米津玄師-Discography'
:
send
=
{
'message'
:
{
'text'
:
album
+
'\n발매년도 : '
+
discography
[
0
].
json_year
[
index
]
+
'\n수록곡 : \n'
+
discography
[
0
].
json_track
[
index
]
'message'
:
{
'text'
:
'Album List'
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'米津玄師-Discography'
,
'초기화면'
]
}
}
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
discography
[
0
].
json_album
}
break
;
/// 米津玄師 ///
case
'米津玄師'
:
};
break
;
case
'ヨルシカ'
:
send
=
{
'message'
:
{
'text'
:
'이름 : 米津玄師(Yonezu Kenshi) \n 성별 : 남성 \n생년월일 : 1991년 3월 10일 \n혈액형 : O형
'
,
'photo'
:
{
'url'
:
'http://reissuerecords.net/rr/wp-content/uploads/flamingo_photo
2.jpg'
,
'width'
:
1000
,
'height'
:
667
'message'
:
{
'text'
:
'개요 : 2인조 밴드\n멤버 : n-buna, suis \n역할 : 작사, 작곡, 편곡 - n-buna\n 보컬 - suis\n서포트 멤버 : \n 下鶴光康(Guitar)\n キタニタツヤ(Bass)\n Masack(Drums)
'
,
'photo'
:
{
'url'
:
'http://yorushika.com/wp-content/uploads/2018/05/biography_image
2.jpg'
,
'width'
:
1000
,
'height'
:
667
},
'message_button'
:
{
'label'
:
'공식 홈페이지'
,
'url'
:
"http://reissuerecords.net
/"
'message_button'
:
{
'label'
:
'공식 홈페이지'
,
'url'
:
"http://yorushika.com
/"
}
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'米津玄師
-Discography'
]
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'ヨルシカ
-Discography'
]
}
};
break
;
case
'
米津玄師-Discography'
:
case
'
ヨルシカ-Discography'
:
send
=
{
'message'
:
{
'text'
:
'Album List'
'message'
:
{
'text'
:
'Album List'
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
discography
[
0
].
json_album
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'ㅁ'
]
}
};
break
;
// 앨범 정보 읽기 //
case
discography
[
0
].
json_album
[
index
]:
var
album
=
'앨범 : '
+
discography
[
0
].
json_album
[
index
].
substr
(
3
);
if
(
singer
==
'Reol'
)
{
send
=
{
'message'
:
{
'text'
:
album
+
'\n발매년도 : '
+
discography
[
0
].
json_year
[
index
]
+
'\n수록곡 : \n'
+
discography
[
0
].
json_track
[
index
]
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'Reol-Discography'
,
'초기화면'
]
}
}
}
else
if
(
singer
==
'Yonezu'
)
{
send
=
{
'message'
:
{
'text'
:
album
+
'\n발매년도 : '
+
discography
[
0
].
json_year
[
index
]
+
'\n수록곡 : \n'
+
discography
[
0
].
json_track
[
index
]
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'米津玄師-Discography'
,
'초기화면'
]
}
}
}
else
if
(
singer
==
'yorusika'
){
send
=
{
'message'
:
{
'text'
:
album
+
'\n발매년도 : '
+
discography
[
0
].
json_year
[
index
]
+
'\n수록곡 : \n'
+
discography
[
0
].
json_track
[
index
]
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'ヨルシカ-Discography'
,
'초기화면'
]
}
}
}
break
;
case
'초기화면'
:
send
=
{
'message'
:
{
...
...
Please
register
or
login
to post a comment