Skip to main content

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 track
  • https://www.kkbox.com/{region}/{lang}/album/{id} — full album
  • https://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


Download files

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

Source Distribution

librelyrics_kkbox-1.0.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

librelyrics_kkbox-1.0.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

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

Hashes for librelyrics_kkbox-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d655dd7fab4b9682c19ea87a049e40f29849b7d80cf86c31c0219e2362b3804a
MD5 c0fee9914ec171ae0d7595d24e853c9a
BLAKE2b-256 c83617817fc430b037b219072104b82b2ab21136911adcd6fb1f30be35c214a7

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file librelyrics_kkbox-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for librelyrics_kkbox-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73e4a271439cfc3903469b0fe40c4b1f02b2ca587eea6ff97f78aabbe37f9cd6
MD5 0d9fe6c081ffbec439171315072e7754
BLAKE2b-256 7b5db4a642e71517727a866b983c9045844ea44a8c134e7e92db91f9cec1a19b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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