A cli that may or may not download albums from a certain website
Project description
PyTubeMusic
A cli that may or may not download albums from a certain website.
PyTubeMusic is in alpha. Features are limited and significant API changes are expected
Install
pip install pytubemusic
Requires ffmpeg to be installed on your machine.
Usage
PyTubeMusic can download tracks in three formats:
- Tracks (Single files)
- Albums (A single video that is split up into individual tracks on an album)
- Playlists (Videos in a playlist that are downloaded as tracks on an album)
Each type of track needs a different configuration file that includes metadata. These are described below.
Tracks
Track toml files have the following format:
url = "..." # URL to video
start = ... # start time in seconds (optional)
end = ... # end time in seconds (optional)
[metadata]
track = "..." # Track Name (required)
# Any other FFMPEG MP3 metadata tags
Albums
# album_data.toml
url = "..." # URL here
# Track data – a list of tables
# Each track needs a start time and an optional end time
# If an end time is not used the next track start time or the end of the video
# will be used
# The metadata "title" tag is required
tracks = [
{ start = "00:00", metadata = { title = "..." } },
{ start = "24:00", end = "...", metadata = { title = "..." } },
]
[metadata]
album = "..." # Album name (required)
# Any other FFMPEG MP3 metadata tags
Playlists
url = "..." # URL to playlist
[metadata]
album = "..." # Album name (required)
# Any other FFMPEG MP3 metadata tags
CLI
A pytubemusic
command will be exposed.
This has three commands: album
, track
, playlist
.
Each command corresponds to one of the file types mentioned above.
The commands all take the path to a config TOML file and an optional -o
or --out
option pointing to a directory to write the resulting tracks too.
(Note: albums and playlists are put into their own directory with the album
name).
For example:
pytubemusic album myConfig.toml -o exports
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
Built Distribution
Hashes for pytubemusic-0.0.1a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ba53a9fdd75dd304c58a9345e0bddbc7aa528dcc2cbd21a8d86e0fb6b051766 |
|
MD5 | a728d89f2b83b15810fd145bcf7e9392 |
|
BLAKE2b-256 | 84f0ef3cf3d7eb7ca7c6c8b628724fd5abb49a837a90b3bf83be2e32093c163c |