This release is a pre-release and may not be stable for production use.
metalparser
metalparser is a Python API for obtaining song lyrics from diverse lyrics websites. At the moment there is only one supported website, which is DarkLyrics, an online database of lyrics for heavy metal music.
Description
This library scrapes the corresponding website for the lyrics and returns results according to the used API. Kindly read the disclaimer to ensure that your use complies with it.
Installation
metalparser is distributed as a Python package, freely available on PyPI and can easily be installed via pip.
Given that you are using python >= 3.5:
pip install metalparser
Alternatively, it can be manually installed by cloning this project on your local computer:
git clone https://github.com/lucone83/metal-parser.git
cd metal-parser
pip install .
Documentation
The library comes (at the moment) with 6 APIs:
- get_artists_list()
- get_albums_info()
- get_songs_info()
- get_album_info_and_lyrics()
- get_albums_info_and_lyrics_by_artist()
- get_song_info_and_lyrics()
More complete docs regarding this project can be found on readthedocs.
Some examples
I recommend not to change the default settings regarding requests rate per minute and the wait time (3 secs) after each request. DarkLyrics does not have a robots.txt, so they don't really like scraping. Be gentle! :)
from metalparser.darklyrics import DarkLyricsApi
api = DarkLyricsApi()
Retrieve the lyrics given a song and the corresponding artist:
song = 'under grey skies'
artist = 'kamelot'
lyrics = api.get_song_info_and_lyrics(song=song, artist=artist, lyrics_only=True)
print(lyrics)
Get all the songs of a specific album:
artist = 'pantera'
album = 'vulgar display of power'
songs_list = api.get_songs_info(artist, album=album, title_only=True)
print(songs_list)
Get all the albums of a specific artist:
artist = 'iron maiden'
albums_list = api.get_albums_info(artist=artist, title_only=True)
print(albums_list)
Support
Currently the following python versions are supported:
- 3.4.*
- 3.5.*
- 3.6.*
- 3.7.*
- 3.8.*
Thanks to
- res0nance and his darklyrics project for inspiration;
Metadata
Release files for metalparser 0.6.9b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| metalparser-0.6.9b1.tar.gz | 13.1 kB | Without provenance | Details for metalparser-0.6.9b1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| metalparser-0.6.9b1-py3-none-any.whl | Python 3 | none | any | Details for metalparser-0.6.9b1-py3-none-any.whl |
Total release size: 26.1 kB
Release files / metalparser-0.6.9b1.tar.gz
| Download URL | metalparser-0.6.9b1.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17eb250ee52930149b8b6b2235ea79947fcc0c3f540df199aa9581f7d4dbca9a
|
|
BLAKE2b-256 checksum How to use checksums |
ef661d6de77fe30b2b5776074f6708a6e4b50bd8b175c1c8959a3bca6c105674
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
|
Release files / metalparser-0.6.9b1-py3-none-any.whl
| Download URL | metalparser-0.6.9b1-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8461df4a82c970fa955d7240b47c6958931473da99a06c7100b8fa8a2f04654
|
|
BLAKE2b-256 checksum How to use checksums |
729a095d6e6d3357f41ab5000e66662c4491255445efadb9dfef40301af1788c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
|
Security for metalparser 0.6.9b1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.