Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김건
/
Comment_Analysis
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-11-14 13:55:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1ccf42094d708eb1e387ca2863a3616de3b39432
1ccf4209
1 parent
5d19d1f9
2차 개발 사항 중 오류 수정
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
Youtube/downloader.py
Youtube/downloader.py
View file @
1ccf420
...
...
@@ -168,6 +168,7 @@ def main():
if
Number
==
'0'
:
with
io
.
open
(
output
,
'w'
,
encoding
=
'utf8'
)
as
fp
:
for
comment
in
download_comments
(
youtube_id
):
comment_json
=
json
.
dumps
(
comment
,
ensure_ascii
=
False
)
print
(
comment_json
.
decode
(
'utf-8'
)
if
isinstance
(
comment_json
,
bytes
)
else
comment_json
,
file
=
fp
)
count
+=
1
sys
.
stdout
.
write
(
'Downloaded
%
d comment(s)
\r
'
%
count
)
...
...
@@ -179,6 +180,7 @@ def main():
i
=
0
for
comment
in
download_comments
(
youtube_id
):
result_List
.
append
(
comment
)
print
(
result_List
[
i
])
count
+=
1
i
+=
1
if
limit
and
count
>=
limit
:
...
...
Please
register
or
login
to post a comment