KKBOX lyrics provider plugin for LibreLyrics
Project description
librelyrics-kkbox
KKBOX lyrics provider plugin for LibreLyrics.
Fetches plain and synced lyrics from KKBOX's encrypted API.
Installation
pip install librelyrics-kkbox
Or from source:
pip install git+https://github.com/libre-lyrics/librelyrics-kkbox.git
Configuration
Run the interactive configuration editor:
librelyrics config edit
You will need the following settings:
| Key | Description |
|---|---|
email |
Your KKBOX account email |
password |
Your KKBOX account password |
kc1_key |
KC1 decryption key (32-character hex string) |
secret_key |
API secret key (32-character hex string) |
kkid |
Device identifier (optional, auto-generated) |
Finding the keys
The kc1_key and secret_key can be extracted from the KKBOX Android app.
These are static keys embedded in the application binary.
Usage
CLI
# Fetch lyrics for a single track
librelyrics "https://www.kkbox.com/tw/tc/song/abcdef123456"
# Fetch lyrics for an entire album
librelyrics "https://www.kkbox.com/tw/tc/album/abcdef123456"
# Fetch lyrics for a playlist
librelyrics "https://www.kkbox.com/tw/tc/playlist/abcdef123456"
Python API
from librelyrics import LibreLyrics
ll = LibreLyrics(config={
'kkbox': {
'email': 'your@email.com',
'password': 'yourpassword',
'kc1_key': '0123456789abcdef0123456789abcdef',
'secret_key': 'fedcba9876543210fedcba9876543210',
}
})
# Single track
result = ll.fetch("https://www.kkbox.com/tw/tc/song/abcdef123456")
print(result.to_lrc())
# Album (batch)
results = ll.fetch_batch("https://www.kkbox.com/tw/tc/album/abcdef123456")
for r in results:
print(r.title, "-", r.artist)
print(r.to_lrc())
Supported URL formats
https://www.kkbox.com/{region}/{lang}/song/{id}— single trackhttps://www.kkbox.com/{region}/{lang}/album/{id}— full albumhttps://www.kkbox.com/{region}/{lang}/playlist/{id}— playlist
Requirements
- Python ≥ 3.10
- LibreLyrics ≥ 1.0.0
- PyCryptodome(x) ≥ 3.15.0
- A valid KKBOX account with an active subscription
License
GPL-3.0-or-later
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
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 librelyrics_kkbox-1.0.0.tar.gz.
File metadata
- Download URL: librelyrics_kkbox-1.0.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d655dd7fab4b9682c19ea87a049e40f29849b7d80cf86c31c0219e2362b3804a
|
|
| MD5 |
c0fee9914ec171ae0d7595d24e853c9a
|
|
| BLAKE2b-256 |
c83617817fc430b037b219072104b82b2ab21136911adcd6fb1f30be35c214a7
|
Provenance
The following attestation bundles were made for librelyrics_kkbox-1.0.0.tar.gz:
Publisher:
release_to_pypi.yml on libre-lyrics/librelyrics-kkbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
librelyrics_kkbox-1.0.0.tar.gz -
Subject digest:
d655dd7fab4b9682c19ea87a049e40f29849b7d80cf86c31c0219e2362b3804a - Sigstore transparency entry: 1059847187
- Sigstore integration time:
-
Permalink:
libre-lyrics/librelyrics-kkbox@ebcb2b21861d069f3aa34160eaca28f8dc644478 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/libre-lyrics
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_to_pypi.yml@ebcb2b21861d069f3aa34160eaca28f8dc644478 -
Trigger Event:
push
-
Statement type:
File details
Details for the file librelyrics_kkbox-1.0.0-py3-none-any.whl.
File metadata
- Download URL: librelyrics_kkbox-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73e4a271439cfc3903469b0fe40c4b1f02b2ca587eea6ff97f78aabbe37f9cd6
|
|
| MD5 |
0d9fe6c081ffbec439171315072e7754
|
|
| BLAKE2b-256 |
7b5db4a642e71517727a866b983c9045844ea44a8c134e7e92db91f9cec1a19b
|
Provenance
The following attestation bundles were made for librelyrics_kkbox-1.0.0-py3-none-any.whl:
Publisher:
release_to_pypi.yml on libre-lyrics/librelyrics-kkbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
librelyrics_kkbox-1.0.0-py3-none-any.whl -
Subject digest:
73e4a271439cfc3903469b0fe40c4b1f02b2ca587eea6ff97f78aabbe37f9cd6 - Sigstore transparency entry: 1059847189
- Sigstore integration time:
-
Permalink:
libre-lyrics/librelyrics-kkbox@ebcb2b21861d069f3aa34160eaca28f8dc644478 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/libre-lyrics
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_to_pypi.yml@ebcb2b21861d069f3aa34160eaca28f8dc644478 -
Trigger Event:
push
-
Statement type: