Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-2-capstone-design1
/
HCG_project
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
GyuhoLee
2020-10-09 15:58:52 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
301bfef2f720723df52a4b1de276eb7ba0f4e099
301bfef2
1 parent
4c17476e
[Add] 유튜브 자막을 xml으로 추출(PyTube 사용)
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
src/subtitle.py
src/subtitle.py
0 → 100644
View file @
301bfef
from
pytube
import
YouTube
video_url
=
'https://www.youtube.com/watch?v=Zg3j6anDU6U'
yt
=
YouTube
(
video_url
)
caption
=
yt
.
captions
.
get_by_language_code
(
'ko'
)
if
(
caption
==
None
):
caption
=
yt
.
captions
.
all
()[
0
]
caption
.
xml_captions
()
\ No newline at end of file
Please
register
or
login
to post a comment