Google 클라우드 플랫폼을 사용하여 Youtube에서 비디오 전사를 가져옵니다.
프라그나칼프 기술연구소
. 코드가 내 예상과 조금 다르지만 일부 필터를 적용하여 YouTube 비디오의 스크립트를 볼 수 있도록 만들었습니다.
우리 과정에 몇 가지 단계가 포함되어 있으니 기다려 주세요!!
# pip install google-api-python-client
# pip install youtube_transcript_api
from apiclient.discovery import build
from youtube_transcript_api import YouTubeTranscriptApi
api_key = "Secret Key" # replace it with your API key
video_id = str(input("Enter the video id: ")) # replace it with your channel id
youtube = build('youtube', 'v3',developerKey=api_key)
try:
responses = YouTubeTranscriptApi.get_transcript(
video_id, languages=['en'])
print('\n'+"Video: "+"https://www.youtube.com/watch?v=" +
str(video_id)+'\n'+'\n'+"Captions:")
for response in responses:
text = response['text']
print(text)
except Exception as e:
print(e)
# pip install google-api-python-client
# pip install youtube_transcript_api
from apiclient.discovery import build
from youtube_transcript_api import YouTubeTranscriptApi
api_key = "Secret Key" # replace it with your API key
video_id = str(input("Enter the video id: ")) # replace it with your channel id
youtube = build('youtube', 'v3',developerKey=api_key)
try:
responses = YouTubeTranscriptApi.get_transcript(
video_id, languages=['en'])
print('\n'+"Video: "+"https://www.youtube.com/watch?v=" +
str(video_id)+'\n'+'\n'+"Captions:")
for response in responses:
text = response['text']
print(text)
except Exception as e:
print(e)
# pip install google-api-python-client
# pip install youtube_transcript_api
from apiclient.discovery import build
from youtube_transcript_api import YouTubeTranscriptApi
api_key = "Secret Key" # replace it with your API key
video_id = str(input("Enter the video id: ")) # replace it with your channel id
youtube = build('youtube', 'v3',developerKey=api_key)
try:
responses = YouTubeTranscriptApi.get_transcript(
video_id, languages=['en'])
print('\n'+"Video: "+"https://www.youtube.com/watch?v=" +
str(video_id)+'\n'+'\n'+"Captions:")
for response in responses:
text = response['text']
print(text)
except Exception as e:
print(e)
API 키와 그 모든 것을 얻는 방법에 대한 전체 자습서는 이에 대한 제 중간 기사를 확인할 수 있습니다. 👇👇👇
솔직히 말해서 dev 플랫폼에서 코드와 구문 강조 표시 및 이미지 삽입을 작성하는 것이 약간 어렵다는 것을 알지만 코드가 그다지 매력적으로 보이지 않을 수 있지만 YouTube의 모든 비디오에서는 잘 작동합니다.
또한 내 트위터에서 나를 팔로우할 수 있습니다.
Reference
이 문제에 관하여(Google 클라우드 플랫폼을 사용하여 Youtube에서 비디오 전사를 가져옵니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/computergeek/getting-the-transcription-of-a-video-from-youtube-using-google-cloud-platform-19ed텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)