Spaces:
Running
Running
jhj0517
commited on
Commit
•
ebb9b01
1
Parent(s):
a63d493
refactoring
Browse files
modules/youtube_manager.py
CHANGED
@@ -1,12 +1,15 @@
|
|
1 |
from pytube import YouTube
|
2 |
import os
|
3 |
|
|
|
4 |
def get_ytdata(link):
|
5 |
return YouTube(link)
|
6 |
|
|
|
7 |
def get_ytmetas(link):
|
8 |
yt = YouTube(link)
|
9 |
-
return yt.thumbnail_url,yt.title,yt.description
|
|
|
10 |
|
11 |
-
def get_ytaudio(ytdata:YouTube):
|
12 |
return ytdata.streams.get_audio_only().download(filename=os.path.join("modules", "yt_tmp.wav"))
|
|
|
1 |
from pytube import YouTube
|
2 |
import os
|
3 |
|
4 |
+
|
5 |
def get_ytdata(link):
|
6 |
return YouTube(link)
|
7 |
|
8 |
+
|
9 |
def get_ytmetas(link):
|
10 |
yt = YouTube(link)
|
11 |
+
return yt.thumbnail_url, yt.title, yt.description
|
12 |
+
|
13 |
|
14 |
+
def get_ytaudio(ytdata: YouTube):
|
15 |
return ytdata.streams.get_audio_only().download(filename=os.path.join("modules", "yt_tmp.wav"))
|