Spaces:
Build error
Build error
Download modules/youtube_manager.py from lbdhr/Whisper-WebUI: direct link, hf CLI and curl.
- Browser
- Download file 324 Bytes
-
https://huggingface.co/spaces/lbdhr/Whisper-WebUI/resolve/d419ad4fbe338426d5dcee78abda1704701d623c/modules/youtube_manager.py
- Command line
-
hf download hf://spaces/lbdhr/Whisper-WebUI@d419ad4fbe338426d5dcee78abda1704701d623c/modules/youtube_manager.py
-
curl -L -o youtube_manager.py https://huggingface.co/spaces/lbdhr/Whisper-WebUI/resolve/d419ad4fbe338426d5dcee78abda1704701d623c/modules/youtube_manager.py
324 Bytes
| from pytube 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")) | |