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-01 14:31:01 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
002986e32d2d2fac7c41b742938e05e0d9c47086
002986e3
1 parent
05a172a9
Feat add design
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
37 deletions
CommentLoadingTest.js
CommentLoadingTest.js
View file @
002986e
var
http
=
require
(
'http'
);
var
fs
=
require
(
'fs'
);
var
url
=
require
(
'url'
);
var
testFolder
=
'./data'
;
var
qs
=
require
(
'querystring'
);
var
path
=
require
(
'path'
);
const
http
=
require
(
'http'
);
const
fs
=
require
(
'fs'
);
const
url
=
require
(
'url'
);
const
testFolder
=
'./data'
;
const
qs
=
require
(
'querystring'
);
const
path
=
require
(
'path'
);
const
{
google
}
=
require
(
"googleapis"
);
const
service
=
google
.
youtube
(
'v3'
);
const
apiKey
=
'AIzaSyCjBrFKnBlGvxsfOD-qJP8nBkdEoqKRHu8'
;
//api키
...
...
@@ -25,26 +25,45 @@ function showcomment(response, VideoNum){
<!doctype html>
<html>
<head>
<title>Youtube Comment</title>
<meta charset="utf-8">
<title>Youtube Comment</title>
<meta charset="utf-8">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Ubuntu&display=swap" rel="stylesheet">
</head>
<body>
<form action="http://localhost:3000/search" method="get">
<p>
<textarea name="videourl" placeholder="Write your video Url" >
${
VideoNum
}
</textarea>
</p>
<p>
<input type="submit">
</p>
</form>
<br>
<br>
<iframe width="560" height="315" src="https://www.youtube.com/embed/
${
VideoNum
}
" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br>
<a href="http://localhost:3000/search?videourl=
${
VideoNum
}
&nextpage=
${
savednpt
}
"><input type="button" value="댓글 더 불러오기"></a>
<br>
${
commentDisplay
}
<body style="margin:5%">
<h1 style="font-family: 'Permanent Marker', cursive; text-align:center; padding-bottom:1%;">Youtube Comment Seperator</h1>
<form action="http://localhost:3000/search" method="get">
<div class="form-group" style="font-family: 'Ubuntu', sans-serif;">
<input type="text" name="videourl" placeholder="Type in video ID" class="form-control" style="margin-bottom:10px;">
<label for="language-select">Choose a language:</label>
<select class="form-control" name="languages" id="language-select" style="display:inline-flex;">
<option value="all" selected>--Please choose an option--</option>
<option value="ko">한국어</option>
<option value="en">English</option>
<option value="ja">日本語</option>
<option value="zh-CN">中國語</option>
<option value="es">español</option>
<option value="fr">Français</option>
<option value="de">Deutsch</option>
</select>
<p align="right" style="margin-top:1%">
<button type="submit" class="btn btn-danger">Display Comments</button>
</p>
</div>
</form>
<br>
<br>
<div class="embed-responsive embed-responsive-16by9" style="text-align:center;">
<iframe class="embed-responsive-item" width="560" height="315" src="https://www.youtube.com/embed/
${
VideoNum
}
" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
<br>
<a class="btn btn-dark" href="http://localhost:3000/search?videourl=
${
VideoNum
}
&nextpage=
${
savednpt
}
" role="button">Show more comments</a>
<br>
<div id="results"></div>
${
commentDisplay
}
</body>
</html>
`
;
...
...
@@ -102,20 +121,37 @@ var app = http.createServer(function(request,response){ // request는 브라우
<!doctype html>
<html>
<head>
<title>Youtube Comment</title>
<meta charset="utf-8">
<title>Youtube Comment</title>
<meta charset="utf-8">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Ubuntu&display=swap" rel="stylesheet">
</head>
<body>
<form action="http://localhost:3000/search" method="get">
<p>
<textarea name="videourl" placeholder="Write your video Url"></textarea>
</p>
<p>
<input type="submit">
</p>
</form>
<body style="margin:5%">
<h1 style="font-family: 'Permanent Marker', cursive; text-align:center; padding-bottom:1%;">Youtube Comment Seperator</h1>
<form action="http://localhost:3000/search" method="get">
<div class="form-group" style="font-family: 'Ubuntu', sans-serif;">
<input type="text" name="videourl" placeholder="Type in video ID" class="form-control" style="margin-bottom:10px;">
<label for="language-select">Choose a language:</label>
<select class="form-control" name="languages" id="language-select" style="display:inline-flex;">
<option value="all" selected>--Please choose an option--</option>
<option value="ko">한국어</option>
<option value="en">English</option>
<option value="ja">日本語</option>
<option value="zh-CN">中國語</option>
<option value="es">español</option>
<option value="fr">Français</option>
<option value="de">Deutsch</option>
</select>
<p align="right" style="margin-top:1%">
<button type="submit" class="btn btn-danger">Display Comments</button>
</p>
</div>
</form>
</body>
</html>
</html>
`
;
response
.
writeHead
(
200
);
response
.
end
(
body
);
...
...
Please
register
or
login
to post a comment