Answers for "ytdl python check video length"

0

ytdl python check video length

import youtube_dl

ydl_opts = {
  'outtmpl': 'tmp/%(id)s.%(ext)s',
  'prefer_ffmpeg': True,
  'forceduration':True
}

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    dictMeta = ydl.extract_info(
        "https://www.youtube.com/watch?v=t99ULJjCsaM",
        download=True)

dictMeta['entries'][0]['duration']
Posted by: Guest on February-21-2022

Python Answers by Framework

Browse Popular Code Answers by Language