Skip to content

eggplants/pyjlyric

Repository files navigation

pyjlyric: Japanese Lyric Aggregator

PyPI Python Version Release Package Ghcr

pre-commit.ci status Maintainability Test Coverage

Supported sites

#4

Installation

pip install git+https://github.com/eggplants/pyjlyric
# or
pip install pyjlyric

Usage

CLI

$ jrc https://j-lyric.net/artist/a00126c/l013283.html
===
Title:          春よ来い
Artist:         童謡・唱歌
Lyric:          相馬 御風
Composer:       弘田 龍太郎
===
春よ来い早く来い
あるきはじめたみいちゃんが
赤い鼻緒のじょじょはいて
おんもへ出たいと待っている

春よ来い早く来い
おうちの前の桃の木の
蕾もみんなふくらんで
はよ咲きたいと待っている
$ jrc -h
usage: jrc [-h] [-V] url

get lyric data by URL.

positional arguments:
  url

options:
  -h, --help     show this help message and exit
  -V, --version  show program's version number and exit

supported sites:
  - ...

Library

import pyjlyric

pyjlyric.parse("https://kashinavi.com/song_view.html?155779")

Returns:

KashinaviLyricPage(
    title='Life goes on',
    page_url=HttpUrl('https://kashinavi.com/song_view.html?155779', ),
    pageid='155779',
    artist=WithUrlText(
        link=HttpUrl('https://kashinavi.com/artist.html?artist=104498&kashu=King+%26+Prince&start=1', ),
        text='King & Prince'
    ),
    composer='Joacim Persson・Johan Alkenas・SQVARE・Sean Michael Alexander',
    lyricist='木村友威',
    arranger=None,
    lyric_sections=[['Keep it up, keep it up yup'], [...], [..., "Let's live it up"]]
)