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-04 22:33:51 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
78fa7fa5f4c45cdd9ecbb2209ec5b5e6a7de3d1f
78fa7fa5
1 parent
344b5b7f
update youtube.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
youtube.js
youtube.js
View file @
78fa7fa
var
response
=
'IU'
;
var
request
=
require
(
"request"
);
var
request
=
require
(
'request'
);
var
cheerio
=
require
(
'cheerio'
);
var
options
=
{
method
:
'GET'
,
url
:
'https://www.googleapis.com/youtube/v3/search'
,
qs
:
{
key
:
'AIzaSyA8-HR7V5cGIwWiBUWzKZsm5yzwrYc-4ys'
,
part
:
'
snippet
'
,
part
:
'
id
'
,
maxResults
:
'1'
,
order
:
'viewCount'
,
q
:
response
,
type
:
'video'
},
};
request
(
options
,
function
(
error
,
response
,
body
)
{
if
(
error
)
throw
new
Error
(
error
);
request
(
options
,
function
(
error
,
result
,
body
)
{
if
(
error
)
throw
new
Error
(
error
);
console
.
log
(
body
);
var
temp
=
body
.
replace
(
'{'
,
''
);
var
temp1
=
temp
.
split
(
'\n'
);
console
.
log
(
temp1
);
});
\ No newline at end of file
...
...
Please
register
or
login
to post a comment