Spaces:
Sleeping
Sleeping
File size: 350 Bytes
db9aaa1 ac6ccb1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import os
os.system('pip install -qq yt-dlp -U')
from yt_dlp import YoutubeDL
def url_download(url):
outtmpl = url[-5:] + '.mp4'
ydl_opts = {'format': 'bestvideo[ext=mp4]+bestaudio[ext=mp4]/mp4+best[height<=144]', 'outtmpl': outtmpl}
with YoutubeDL(ydl_opts) as ydl:
ydl.extract_info(url, download=True)
return outtmpl |