Skip to main content

A versatile tool for YouTube media downloading and AI processing.

Project description

imansur_ytb

A versatile tool for YouTube media downloading and AI processing.

Installation

pip install imansur_ytb

Usage

from imansur_ytb.media import get_video

# Basic usage
results = get_video("https://www.youtube.com/watch?v=...", rename="my_video")

# Advanced usage with all parameters
results = get_video(
    url="https://www.youtube.com/watch?v=...",
    get_best_quality=True,      # Download highest resolution (default: True)
    audio_only=False,           # Only download audio track (default: False)
    get_transcript=True,        # Download English transcript (default: True)
    rename="my_custom_name",    # Custom name for files/folders
    audio_format="mp3",         # Desired audio format: mp3, m4a, wav, flac, aac (default: mp3)
    quiet=True                  # Suppress yt-dlp logs (default: True, set False for debugging)
)

Parameters

Parameter Type Default Description
url str Required YouTube Video or Playlist URL.
get_best_quality bool True Downloads the best available quality and merges streams.
audio_only bool False Extract and download only the audio track.
get_transcript bool True Downloads the English transcript as a JSON file.
rename str None Custom filename (or directory name for playlists).
audio_format str "mp3" Audio extension (mp3, m4a, wav, flac, aac).
quiet bool True Set to False to see full download and merge logs.

Response

The function returns a list of dictionaries:

[
  {
    "id": "video_id",
    "title": "Video Title",
    "file_path": "/path/to/video.mp4",
    "transcript_path": "/path/to/transcript.json"
  }
]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imansur_ytb-0.1.8.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imansur_ytb-0.1.8-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file imansur_ytb-0.1.8.tar.gz.

File metadata

  • Download URL: imansur_ytb-0.1.8.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for imansur_ytb-0.1.8.tar.gz
Algorithm Hash digest
SHA256 bdb35d880d557af4ac445e13934031a184826eb7a5b1a7579546d5edf659e485
MD5 62a6e21db3c2a86c9923884ecd6dd546
BLAKE2b-256 0783605fbeef5c40965ff3b2c82a1baf274548793d7c47624acd85952e62bfe4

See more details on using hashes here.

File details

Details for the file imansur_ytb-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: imansur_ytb-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for imansur_ytb-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a1387ad2f3636c810c97c4960e987106955b74731d03c6a666053dcf870b64a6
MD5 15d1aa0b68360b8c8da63857b124615a
BLAKE2b-256 5401c3c44a7f218a90ab5efab48662fc811b51d8da1649d94295e3ec19622d04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page