Skip to main content



Library for downloading and converting YouTube music to MP3 with comprehensive testing and CI/CD.
(Optimized for Linux systems).


Installation

System Dependencies

sudo apt update && sudo apt upgrade -y
sudo apt install ffmpeg yt-dlp -y

Install via pip

pip3 install tubemp3 -U

Usage

CLI Example

tubemp3 "https://music.youtube.com/watch?v=Wy_6jN1Yrx8&si=pgL_4Ozjafkkms8X" "/sdcard/Alarms/root_kali.mp3"
Sample Output
tube search info:
file: /sdcard/Alarms/root_kali.mp3
link: https://music.youtube.com/watch?v=Wy_6jN1Yrx8&si=pgL_4Ozjafkkms8X
search: False
info music link:
'title': '3.1_4-root@kali.0cc'
'artist': 'Mac Quayle'
'album': 'Mr. Robot, Vol. 5'
'duration': '152'
'format': 'webm'
'filesize': '3091263'
...
converting to MP3...
saving metadata...

Python API

Download via URL

from tubemp3 import get_info_link as gil
from tubemp3.file import download

music = gil("https://music.youtube.com/watch?v=yspAcpXEzSM")
download(music)

Search and Download

from tubemp3 import search_music
from tubemp3.file import download

music = search_music("like a player wolverine deadpool chor")[0]
download(music)

Get Metadata Only

from tubemp3 import search_music

query = "like a player wolverine deadpool chor"
music = search_music(query)[0]

for key, value in music.items():
    print(f"{key}: {value}")

Info from link

from tubemp3 import search_music
from tubemp3  import get_info_link
from kitano import puts

    query = "like a player wolverine deadpool chor"
    musics = search_music(query)

    assert len(musics) > 0
    puts(f"Total musics found: {len(musics)}")

    music = musics[0]
    info = get_info_link(music.url)
    puts('--- Music Info ---')
    puts(info)
---

Metadata

Release files for tubemp3 0.4.2

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

Built distribution (wheel)

Table of built distributions (wheels) for tubemp3 0.4.2
File Interpreter ABI Platform
tubemp3-0.4.2-py3-none-any.whl Python 3 none any Details

Release files / tubemp3-0.4.2-py3-none-any.whl

Download URL tubemp3-0.4.2-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d2b10c498d2c6994404ee3c3d2f1b66b4b0bd1b142664abb9021db00e52306b
BLAKE2b-256 checksum
How to use checksums
f65ae483922353243d576f3b6d8de00e8b3229d3bc7bce0352fce223411d49f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Security for tubemp3 0.4.2

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.

Release history Release notifications | RSS feed

This release

0.4.2 This release

1 release file No provenance

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