Whisper-WebUI / modules /utils /youtube_manager.py
jhj0517
update to pytubefix
05b9d17
raw
history blame
327 Bytes
from pytubefix import YouTube
import os
def get_ytdata(link):
return YouTube(link)
def get_ytmetas(link):
yt = YouTube(link)
return yt.thumbnail_url, yt.title, yt.description
def get_ytaudio(ytdata: YouTube):
return ytdata.streams.get_audio_only().download(filename=os.path.join("modules", "yt_tmp.wav"))