Toggle navigation
Toggle navigation
This project
Loading...
Sign in
곽윤철
/
youtube-comment-seperator
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
Yuncheol Kwak
2022-06-03 18:41:04 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9132f825782391e96ed8c21468fb7601f6dbe600
9132f825
1 parent
de850de8
Deleted unnecessary files
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
69 deletions
CommentLoadingTest.js → app.js
language-guess.js
test.js
CommentLoadingTest
.js
→
app
.js
View file @
9132f82
File moved
language-guess.js
deleted
100644 → 0
View file @
de850de
import
{
franc
}
from
'franc'
;
import
langs
from
'langs'
;
function
getLang
(
se
)
{
let
langCode
=
""
;
if
(
se
.
length
<
10
)
{
langCode
=
franc
(
se
,
{
minLength
:
`
${
se
.
length
}
`
});
}
else
{
langCode
=
franc
(
se
);
}
return
langs
.
where
(
'3'
,
langCode
).
local
;
}
export
{
getLang
};
\ No newline at end of file
test.js
deleted
100644 → 0
View file @
de850de
//https://developers.google.com/youtube/v3/docs/commentThreads/list
//http://khuhub.khu.ac.kr/2019102147/youtube-comment-seperator.git
const
apiKey
=
'AIzaSyCjBrFKnBlGvxsfOD-qJP8nBkdEoqKRHu8'
;
let
videoNum
=
"m1gHR4dJhKU"
;
const
{
google
}
=
require
(
"googleapis"
);
const
service
=
google
.
youtube
(
'v3'
);
var
npt
=
""
for
(
let
i
=
0
;
i
<
3
;
i
++
){
console
.
log
(
npt
);
service
.
commentThreads
.
list
({
"key"
:
apiKey
,
"part"
:[
"snippet, replies"
],
"videoId"
:
videoNum
,
//비디오 주소
"maxResults"
:
10
,
"pageToken"
:
npt
}).
then
(
function
(
response
)
{
console
.
log
(
"Response"
,
response
);
console
.
log
(
response
.
data
.
items
[
0
].
snippet
.
topLevelComment
.
snippet
.
textDisplay
);
console
.
log
(
response
.
data
.
items
[
1
].
snippet
.
topLevelComment
.
snippet
.
textDisplay
);
npt
=
JSON
.
parse
(
response
.
data
.
nextPageToken
);
},
function
(
err
)
{
console
.
error
(
"Execute error"
,
err
);
});
}
/*
service.comments.list({
"key": apiKey,
"part": [
"snippet"
],
"parentId": "UgzDE2tasfmrYLyNkGt4AaABAg"
}).then(function(response) {
// Handle the results here (response.result has the parsed body).
console.log("Response", response);
console.log(response.data.items)
},
function(err) { console.error("Execute error", err); });
const {YoutubeDataAPI} = require("youtube-v3-api");
const {google} = require("googleapis");
const api = new YoutubeDataAPI(apiKey);
api.searchComments("https://youtu.be/m1gHR4dJhKU").then((data)=>{
console.log(data);
console.log(data.pageInfo);
},(err)=>{
console.error(err);
})
*/
\ No newline at end of file
Please
register
or
login
to post a comment