{"id":24776,"library":"types-yt-dlp","title":"types-yt-dlp","description":"Typing stubs for yt-dlp, providing type hints for the yt-dlp library. Current version 2026.3.17.20260408, released weekly by typeshed. Compatible with Python >=3.10.","status":"active","version":"2026.3.17.20260408","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["typing","stubs","yt-dlp","type-hints"],"install":[{"cmd":"pip install types-yt-dlp","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Runtime library for which types are provided; must be installed separately.","package":"yt-dlp","optional":false}],"imports":[{"note":"The types stub mirrors the yt-dlp package structure.","symbol":"YoutubeDL","correct":"from yt_dlp import YoutubeDL"}],"quickstart":{"code":"import yt_dlp\n\ndef download(url: str) -> None:\n    ydl_opts = {'quiet': True}\n    with yt_dlp.YoutubeDL(ydl_opts) as ydl:\n        info = ydl.extract_info(url, download=False)\n        print(info.get('title', 'No title'))\n\ndownload('https://www.youtube.com/watch?v=dQw4w9WgXcQ')\n","lang":"python","description":"Minimal example showing typed usage of YoutubeDL."},"warnings":[{"fix":"Run 'pip install types-yt-dlp' or add it to your dev dependencies.","message":"The stub package must be installed separately; it does not ship with yt-dlp. Forgetting to install types-yt-dlp results in missing type hints.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from yt_dlp import ...' for main classes.","message":"Old import patterns like 'from yt_dlp.utils import ...' may not be fully covered by stubs. Prefer top-level imports.","severity":"deprecated","affected_versions":">=2023"},{"fix":"Check the yt-dlp version compatibility; upgrade types-yt-dlp regularly.","message":"The stubs are generated from typeshed and may lag behind yt-dlp releases. Newer yt-dlp features might not have type hints.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install yt-dlp'","cause":"yt-dlp library not installed.","error":"ModuleNotFoundError: No module named 'yt_dlp'"},{"fix":"Use 'from yt_dlp import YoutubeDL'","cause":"Typo or wrong case. Correct name is 'YoutubeDL'.","error":"ImportError: cannot import name 'YoutubeDL' from 'yt_dlp'"},{"fix":"Ensure options dict does not contain keys that conflict with function names.","cause":"Accidentally overwritten tuple or misused options dict.","error":"TypeError: 'tuple' object is not callable"},{"fix":"Check URL, network, and consider using cookies or proxies.","cause":"Network issue, invalid URL, or YouTube blocking.","error":"yt_dlp.utils.DownloadError: ERROR: unable to download video"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}