Small wrapper package to interface with YouTube Music
Project description
YTM Fetcher
A Python-based tool for interacting with YouTube Music, allowing users to fetch, download, and play music tracks.
Features
- Fetch song and playlist information from YouTube Music (YTM)
- Save songs locally in WAV or MP3 formats
- Playback full songs or samples
- Models to create and modify playlists, then push them to YTM
Requirements
- yt-dlp - Used for saving music locally
- ytmusicapi - Allows interaction with YTM API
- playsound - Allows local playback within Python
- ffmpeg executable - For downloads and sampling
- Cookie file and browser headers (see Authentication)
Installation
- Either install from PyPI or place the ytm_fetcher folder in your project directory.
- Follow the steps under Authentication to unlock most of the package's functionality.
Authentication
- Folder
- Create a folder 'auth' in your project directory.
- Cookies
- Export browser cookies for YTM to 'cookies.txt' and place the file in the auth folder.
- If you are unsure of how to do this, search your browser webstore for extensions designed to export cookies, or search 'export browser cookies' in your engine of choice.
- Browser Headers
- Export raw headers for YTM to 'headers.txt' and place the file in the auth folder.
- Step-by-step:
- Sign in to YouTube Music on your desired account
- Navigate to music.youtube.com & open developer tools (F12)
- Navigate to the 'Network' tab
- Reload the page to generate new requests
- Find a POST request beginning with browse? and type json
- Under 'Headers', find 'Request Headers'
- Copy the raw headers to a file headers.txt and place this in your auth folder
Usage
# TODO: Usage examples
print("Hello world")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ytm_fetcher-0.1.2.tar.gz
(8.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ytm_fetcher-0.1.2.tar.gz.
File metadata
- Download URL: ytm_fetcher-0.1.2.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dc23dd3e3e546a284376f9f0bdc16f794c02011617a7618c1a35720d87c4c20
|
|
| MD5 |
188a9cc5abea38b5dec27bd728a7109a
|
|
| BLAKE2b-256 |
b796649a9bba3939b4bb8833c1ba4e2716c3cf441c8d3850d8cd987cdeb57541
|
File details
Details for the file ytm_fetcher-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ytm_fetcher-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d811605c85247faf7379fd1d5073e6eaefa28026e618c5fb8edb59c4a0ee531e
|
|
| MD5 |
f8cb0a3f238d170ef37f44ea5b1ca300
|
|
| BLAKE2b-256 |
23459b50e58a5bfa223ba7a8e12f6215e06241283e116cbcb2651374427f1699
|