Export your scrobbling history form ListenBrainz
Project description
listenbrainz_export
Export your scrobbling history form ListenBrainz. ListenBrainz is a public/open-source alternative to RateYourMusic
Since the data is public, no API key/Authentication is required.
Installation
Requires python3.7+
To install with pip, run:
pip install git+https://github.com/seanbreckenridge/listenbrainz_export
Usage
Provide your listenbrainz username -- prints results to STDOUT
listenbrainz_export seanbreckenridge > ./data.json
Can also only request a few pages:
listenbrainz_export seanbreckenridge --pages 3
listenbrainz_export.parse
includes a model of the data and some functions to parse them into python objects, like:
>>> from listenbrainz_export.parse import iter_listens
>>> listens = list(iter_listens("data.json"))
>>> listens[12]
Listen(track_name='Skate', artist_name='Bruno Mars, Anderson .Paak & Silk Sonic', listened_at=datetime.datetime(2021, 11, 6, 19, 10, 49), inserted_at=datetime.datetime(2021, 11, 7, 2, 12, 31), recording_id='e60b9417-acfe-4796-a048-76208fb4a9ad', release_name='Skate - Single', metadata={'artist_msid': 'df6f6937-5de3-4e3c-bd74-1991ed92abd5', 'recording_msid': 'e60b9417-acfe-4796-a048-76208fb4a9ad', 'release_msid': 'dcf6d703-1e95-4e9c-8218-bb7c3b3bfa0b'}, username='seanbreckenridge')
I use this almost exclusively through my HPI; that locates my exports on disks and removes any duplicate scrobbles
Tests
git clone 'https://github.com/seanbreckenridge/listenbrainz_export'
cd ./listenbrainz_export
pip install '.[testing]'
mypy ./listenbrainz_export
flake8 ./listenbrainz_export
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
Close
Hashes for listenbrainz_export-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 145f1f290aba8840dd5519671603a907601bb3138346649e96a0e1af0b3ec18d |
|
MD5 | 8164bcc96566912ef689d16de8e42b28 |
|
BLAKE2b-256 | 6d56730ba9c83c2f897e7e420a369f5f21a7421b9b46e2849a30f7bd72c976e5 |
Close
Hashes for listenbrainz_export-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1461585669db30eadba5ec68dac8788bf96eb0905f51f90457b0f23e5bcc0e08 |
|
MD5 | 298200eacc0f7de0ed96175db1201183 |
|
BLAKE2b-256 | 6d4d318fa868859fc64b6b16484f06be2b8b6d22ef02621a142a162bd06bc8c7 |