Python package to fetch song lyrics from Genius
Project description
Lyrical
A Python package to fetch song lyrics from Genius.
Installation
pip install lyrical
Info
- Author: SnarkyDev
- Version: 1.1.2
- LICENSE: MIT
- USE: Scrapes Genius for lyrics, in an async way
Usage
from lyrical import Lyrics
import asyncio
import json
lyrical = Lyrics()
async def main():
song = "Hello world"
url = await lyrical.search(song)
lyrics = await lyrical.get_lyrics(url)
artist = await lyrical.get_artists(url)
title = await lyrical.get_title(url)
print(f'Lyrics:\n{lyrics}\nArtists: {artist}\nTitle: {title}')
overall = await lyrical.lyrics(song)
print(json.loads(overall))
if __name__ == "__main__":
asyncio.run(main())
API
import lyrical
import asyncio
lyrics = asyncio.run(lyrical.Lyrics.start_api())
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
lyrical-1.1.3.tar.gz
(4.2 kB
view details)
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 lyrical-1.1.3.tar.gz.
File metadata
- Download URL: lyrical-1.1.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8993fbc92892d31d1baf35586a0b7dfb5ac7f9e31c13d2d25704b7341ea21f0
|
|
| MD5 |
964296ad45b17ac66631d93b344bbb56
|
|
| BLAKE2b-256 |
40c77d29f996a9372cb6784ac39449e1c6983b1a963c6a4b2cbe9f5e84df7fae
|
File details
Details for the file lyrical-1.1.3-py3-none-any.whl.
File metadata
- Download URL: lyrical-1.1.3-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee4302c33ee85cbb2fef4d576d7bb24040e324ba11579f65f56510fe512e9e35
|
|
| MD5 |
0d8ec530926acfbfe7952f1b6203536a
|
|
| BLAKE2b-256 |
fef55d2370e3d627dc35fa84a74cc43b329afa836d5c8f8bec404375e0043ba9
|