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 19:50:37 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5eb0acd8fe1002aba22200713d44bc76defbe14e
5eb0acd8
1 parent
df32903a
gg
gg
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
165 deletions
content.js
content.js
deleted
100644 → 0
View file @
df32903
var
webcrawl
=
require
(
'./crawling/Reol'
);
var
async
=
require
(
'async'
);
function
jpSinger
(
msg
,
send
){
var
discography
;
var
task
=
[
function
(
callback
){
webcrawl
.
crawl_Reol
(
'https://namu.wiki/w/%EB%A0%88%EC%98%A4%EB%A3%A8/%EC%9D%8C%EB%B0%98#toc'
).
then
(
function
(
Result
){
callback
(
null
,
Result
)}).
catch
(
function
(
err
){});
},
function
(
discography
,
callback
){
console
.
log
(
discography
);
switch
(
msg
){
case
'Reol'
:
send
=
{
'message'
:
{
'text'
:
'이름 : Reol(れをる) \n성별 : 여성 \n생년월일 : 1993년 11월 9일 \n혈액형 : AB형'
,
'photo'
:
{
'url'
:
'https://www.reol.jp/images/profile/reol_Aphoto_2.png'
,
'width'
:
1000
,
'height'
:
667
},
'message_button'
:
{
'label'
:
'공식 홈페이지'
,
'url'
:
"https://www.reol.jp/"
}
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'Reol-Discography'
]
}
};
break
;
case
'Reol-Discography'
:
console
.
log
(
discography
);
send
=
{
'message'
:
{
'text'
:
'앨범 목록입니다.'
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'a'
]
}
}
break
;
case
'米津玄師'
:
send
=
{
'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
},
'message_button'
:
{
'label'
:
'공식 홈페이지'
,
'url'
:
"http://reissuerecords.net/"
}
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'米津玄師-Discography'
]
}
};
break
;
case
'米津玄師-Discography'
:
send
=
{
'message'
:
{
'text'
:
'Album List'
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'Reol'
,
'米津玄師'
,
'yanaginagi'
,
'ヨルシカ'
,
'ダズビ'
,
'Polkadot Stingray'
,
'Aimyong'
]
}
};
break
;
default
:
break
;
}
callback
(
null
,
send
);
}
];
async
.
waterfall
(
task
,
function
(
err
,
result
){
console
.
log
(
result
,
send
);
});
return
send
;
}
function
krSinger
(
msg
){
var
send
=
{};
switch
(
msg
){
case
'볼빨간사춘기'
:
send
=
{
'message'
:
{
'text'
:
'Reol'
,
'photo'
:
{
'url'
:
'https://www.reol.jp/images/profile/reol_Aphoto_2.png'
,
'width'
:
1000
,
'height'
:
667
},
'message_button'
:
{
'label'
:
'공식 홈페이지'
,
'url'
:
"https://www.reol.jp/"
},
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'Reol-Discography'
,
'Reol-Profile'
]
}
};
break
;
case
'Reol-Discography'
:
send
=
{
'message'
:
{
'text'
:
'Album List.'
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'Reol'
,
'米津玄師'
,
'yanaginagi'
,
'ヨルシカ'
,
'ダズビ'
,
'Polkadot Stingray'
,
'Aimyong'
]
}
};
break
;
case
'米津玄師'
:
send
=
{
'message'
:
{
'text'
:
'米津玄師'
,
'photo'
:
{
'url'
:
'https://www.reol.jp/images/profile/reol_Aphoto_2.png'
,
'width'
:
1000
,
'height'
:
667
},
'message_button'
:
{
'label'
:
'공식 홈페이지'
,
'url'
:
"https://www.reol.jp/"
}
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'Reol-Discography'
,
'Reol-Profile'
]
}
};
break
;
default
:
send
=
{
'message'
:
{
'text'
:
'등록되지 않은 가수입니다.'
},
keyboard
:
{
'type'
:
'buttons'
,
'buttons'
:
[
'한국'
,
'일본'
]
}
}
break
;
}
return
send
;
}
exports
.
jpSinger
=
jpSinger
;
exports
.
krSinger
=
krSinger
;
\ No newline at end of file
Please
register
or
login
to post a comment