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 13:49:15 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
db42b25870370f32e08bdceacd09d0533866209e
db42b258
1 parent
dca3e518
Update app.js
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
app.js
app.js
View file @
db42b25
...
...
@@ -4,7 +4,7 @@ const line = require('@line/bot-sdk');
var
request
=
require
(
'request'
);
var
https
=
require
(
'https'
);
var
http
=
require
(
'http'
);
var
mime
=
require
(
'mime-types'
);
var
fs
=
require
(
"fs"
);
...
...
@@ -105,8 +105,7 @@ async function handleEvent(event) {
};
request
.
post
(
options
,
function
(
error
,
response
,
body
)
{
console
.
log
(
document
.
getElementById
(
body
));
console
.
log
(
mime
.
lookup
(
body
));
var
data
=
body
.
toString
(
'utf-8'
);
var
text
=
''
;
while
(
data
.
indexOf
(
'text\\'
)
!=-
1
)
...
...
@@ -115,7 +114,7 @@ async function handleEvent(event) {
text
+=
data
.
substring
(
0
,
data
.
indexOf
(
"\\"
))
+
" "
;
}
text
=
"나의모든날들"
;
console
.
log
(
text
);
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