Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devlocalhost/pylyrical_api
pylyrical_api - lyrics API scraping from genius.com
https://github.com/devlocalhost/pylyrical_api
beautifulsoup beautifulsoup4 bs4 genius genius-api genius-lyrics genius-lyrics-api lyrics lyrics-api lyrics-fetcher lyrics-finder lyrics-scraping python python-3 python3 scraping scraping-python scraping-websites
Last synced: about 1 month ago
JSON representation
pylyrical_api - lyrics API scraping from genius.com
- Host: GitHub
- URL: https://github.com/devlocalhost/pylyrical_api
- Owner: devlocalhost
- License: mit
- Created: 2023-11-17T15:31:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-20T00:27:06.000Z (5 months ago)
- Last Synced: 2024-07-21T00:25:01.406Z (5 months ago)
- Topics: beautifulsoup, beautifulsoup4, bs4, genius, genius-api, genius-lyrics, genius-lyrics-api, lyrics, lyrics-api, lyrics-fetcher, lyrics-finder, lyrics-scraping, python, python-3, python3, scraping, scraping-python, scraping-websites
- Language: Python
- Homepage:
- Size: 85 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pylyrical_api
pylyrical_api - lyrics API scraping from genius.com# API Token
To self-host, you need to get an API token from the [api client page](https://genius.com/api-clients). You can then add the API token to a ".env" file. Example: `GENIUS_API_TOKEN="T0K3N"`# Usage
- API endpoint: /lyrics
- Acceptable parameters: q
- Example: /lyrics?q=how+do+i+make+you+love+me+the+weekndResponses
- 200
```json
{
"artists": "",
"lyrics": "",
"source": "",
"status": "200",
"title": ""
}
```- 400
```json
{
"exception":
"NoParameter",
"message": "Missing parameter 'q'.",
"status": "400"
}
```- 404
```json
{
"exception": "NoResults",
"message": "'' did not give any results, Please try a different term.",
"status": "404"
}
```- 500
```json
{
"exception": "ScrapeError",
"message": "",
"status": "500"
}
```- 502
```json
{
"exception": "RequestConnectionError",
"message": "",
"status": "502"
}
```# Exceptions/Errors
- NoParameter: Occurs when no parameter was given.
- Returns status code 400.
- NoResults: Occurs when no results were found.
- Returns status code 404.
- ScrapeError: Occurs when pylyrical cannot scrape lyrics from genius.com
- Returns status code 500.
- RequestConnectionError: Occurs when pylyrical cannot send a request to genius.com
- Returns status code 502.