Skip to main content

gold-dl — The simplest YouTube downloader (CLI + Python API)

Downloads Downloads month version Python Version License PyPI stats

gold-dl screenshot

Table of Contents

  • Installation
  • Upgrade
  • Quick Start (CLI)
  • Options
  • Examples
  • Python API
  • Screenshots
  • Todo
  • Contributing
  • License
  • Badges / Usage

Channel Library : https://t.me/Source_Goldd Contact / Developer : @CB6BB

Installation

  1. Verify you have Python 3.x:
python --version
  1. Install gold-dl:
pip install gold-dl --break-system-packages

(If your environment does not require --break-system-packages, you may omit it.)

Upgrade

pip install --upgrade gold-dl --break-system-packages

Quick Start (CLI)

gold-dl "YOUTUBE_LINK" [PATH]
  • "YOUTUBE_LINK" (required) the YouTube video or playlist URL (wrap in quotes).
  • [PATH] (optional) destination folder; defaults to the current working directory.

Common options

  • -v, --version
    • Show current version and exit.
  • -a, --audio
    • Download audio only (skip video selection).
  • -f, --footage
    • Download video only (skip audio-only flows).

Icons used in this README

  • Download
  • Audio
  • Video
  • Folder

Examples

# Download a video (interactive selection if needed)
gold-dl "https://www.youtube.com/watch?v=VIDEO_ID"

# Download audio only
gold-dl "https://www.youtube.com/watch?v=VIDEO_ID" --audio

# Download to a specific folder
gold-dl "https://www.youtube.com/watch?v=VIDEO_ID" ./downloads

# Download a playlist (you can select items or download all)
gold-dl "https://www.youtube.com/playlist?list=PLAYLIST_ID"

Python API (async) Use the async DownloadService to integrate gold-dl into bots and other apps.

import os
import asyncio
from typing import Union
from gold_dl import DownloadService

async def download(bot_username, link, video: Union[bool, str] = None):
    link = link
    loop = asyncio.get_running_loop()   
    def audio_dl():
        try:
            service = DownloadService(url=link, path="downloads/%(id)s.%(ext)s", quality="best", is_audio=True)
            result = service.download()
            return result
        except Exception:
            return None   
    def video_dl():
        try:          
            service = DownloadService(url=link, path="downloads/%(id)s.%(ext)s", quality="360p", is_audio=False)          
            result = service.download()
            return result
        except Exception:
            return None  
    if video:
        downloaded_file = await loop.run_in_executor(None, video_dl)
        return downloaded_file
    else:
        downloaded_file = await loop.run_in_executor(None, audio_dl)
        return downloaded_file

# Example runner:
# asyncio.run(download("botname", "https://www.youtube.com/watch?v=VIDEO_ID", video=None))

Direct Link (New) Use the async DownloadService to integrate gold-dl into bots and other apps.

import os
import asyncio
from typing import Union
from gold_dl import DownloadService

async def download(bot_username, link, video: Union[bool, str] = None):
    link = link
    loop = asyncio.get_running_loop()   
    def audio_dl():
        try:
            service = DownloadService(url=link, quality="best", is_audio=True)
            stream_url = service.get_direct_url(is_audio=True)
            if stream_url:
                return stream_url          
        except Exception:
            return None   
    def video_dl():
        try:
            service = DownloadService(url=link, quality="360p", is_audio=False)
            stream_url = service.get_direct_url(is_audio=False)
            if stream_url:
                return stream_url        
        except Exception:
            return None
    if video:  
        stream_url = await loop.run_in_executor(None, video_dl)
        return stream_url
    else:
        stream_url = await loop.run_in_executor(None, audio_dl)
        return stream_url

# Example runner:
# asyncio.run(download("botname", "https://www.youtube.com/watch?v=VIDEO_ID", video=None))

Screenshots

  • Download video and choose save location
  • Choose download type (audio / video)
  • Select resolution when downloading video
  • Playlist selection UI (pick single video(s) or download all)

Todo

  • Notification System
  • Auto Update package if new version available
  • Support Optional Numbering for Downloaded Playlist Videos
  • Improve code health
  • API (Python)
  • Download Playlist
  • Support setting for default download folder
  • Download thumbnails with videos and audio

Contributing

  • Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
  • Ensure code follows the existing style and add tests where applicable.
  • Update the README and other documentation as necessary.

License

  • See the LICENSE file in the project root (and the PyPI license badge above).

Metadata

Release files for gold-dl 2026.5.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gold-dl 2026.5.20
File Size Uploaded Provenance Actions
gold_dl-2026.5.20.tar.gz 21.5 kB Without provenance Details for gold_dl-2026.5.20.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gold-dl 2026.5.20
File Interpreter ABI Platform Actions
gold_dl-2026.5.20-py3-none-any.whl Python 3 none any Details for gold_dl-2026.5.20-py3-none-any.whl

Total release size: 44.6 kB

Release files / gold_dl-2026.5.20.tar.gz

Download URL gold_dl-2026.5.20.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
815da019d263ecf2d67184ba49fab3604dedc8437fcf525823392a0cf1d3d87c
BLAKE2b-256 checksum
How to use checksums
9685b452c6e53a5faf4d5b1e37d83817d10fffabb47ad2ed160a3587cf7dacf2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release files / gold_dl-2026.5.20-py3-none-any.whl

Download URL gold_dl-2026.5.20-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26617d62d1df4d78d77eeb2d3aca92f2408308ba433a6ad4097af41dbedd409a
BLAKE2b-256 checksum
How to use checksums
c315c9efa48820b94ae2a7200643680e640b8fb5ecff8844f55efb2108e39359
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Security for gold-dl 2026.5.20

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page