JUNGU commited on
Commit
5961a7a
·
verified ·
1 Parent(s): a9b9822

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
- from yt_dlp import YoutubeDL
3
 
4
  def extract_metadata(youtube_url):
5
  ydl_opts = {'quiet': True}
6
  try:
7
- with YoutubeDL(ydl_opts) as ydl:
8
  info = ydl.extract_info(youtube_url, download=False)
9
 
10
  metadata = {
@@ -22,7 +22,7 @@ def extract_metadata(youtube_url):
22
  return f"오류 발생: {str(e)}"
23
 
24
  def check_yt_dlp_version():
25
- return f"yt-dlp 버전: {YoutubeDL.version.__version__}"
26
 
27
  with gr.Blocks() as demo:
28
  gr.Markdown("## YouTube 메타데이터 추출기")
 
1
  import gradio as gr
2
+ import yt_dlp
3
 
4
  def extract_metadata(youtube_url):
5
  ydl_opts = {'quiet': True}
6
  try:
7
+ with yt_dlp.YoutubeDL(ydl_opts) as ydl:
8
  info = ydl.extract_info(youtube_url, download=False)
9
 
10
  metadata = {
 
22
  return f"오류 발생: {str(e)}"
23
 
24
  def check_yt_dlp_version():
25
+ return f"yt-dlp 버전: {yt_dlp.version.__version__}"
26
 
27
  with gr.Blocks() as demo:
28
  gr.Markdown("## YouTube 메타데이터 추출기")