Added legal disclaimers about scraping.. mostly to make sure i dont get into too mutch trouble about things
Some checks failed
build / build (push) Has been cancelled

This commit is contained in:
2025-08-05 01:33:48 +02:00
parent bbf3c645b0
commit 2cf0428d2a
4 changed files with 42 additions and 2 deletions

View File

@@ -1,8 +1,17 @@
# Genius API
## Important notes
### Legal note
For legal reasons, this tool is for educational purposes only. And Scraping is not allowed by the Genius API Terms of Service. And I do not encourage the use of Scraping websites for any data, and that API endpoints should always be used instead.
### Legal Notice
This tool is provided for educational and experimental purposes only.
Please be aware that the Genius API Terms of Service **prohibit** web scraping of their website. This project contains code that performs scraping to retrieve song lyrics directly from Genius.com, which may violate those terms.
Since Genius does not provide official API endpoints for lyrics due to copyright restrictions, this tool includes scraping functionality as a workaround. However, scraping may result in legal or technical consequences such as IP bans, rate limiting, or other restrictions imposed by Genius.
**Use this tool responsibly and at your own risk.** The author does not encourage or endorse violating any third-party terms of service or applicable laws and disclaims any liability arising from misuse.
Whenever possible, prefer using official API endpoints and respect copyright laws.
## API key required
This tool requires a Genius API key to work since it fetches song metadata from the Genius API.

View File

@@ -19,6 +19,20 @@ import java.util.stream.Collectors;
import static me.zacharias.chat.core.Core.writeLog;
/**
* This class is an Ollama tool that fetches the lyrics of a song by its ID from the Genius API.
* It extends the GeniusEndpointTool to utilize the GeniusTools instance for API calls and caching.
* <p>
* <h1>Legal Notice</h1>
* <p>
* I (the developer) do NOT own the rights to the lyrics fetched by this tool, nor do I endorse scraping lyrics from Genius.com,
* which may violate their Terms of Service.
* </p>
* <p>
* I disclaim any responsibility or liability for how this tool is used.
* Use this tool at your own risk, and please respect all applicable copyright laws and third-party terms.
* </p>
*/
@GeniusEndpoint
public class GetLyrics extends GeniusEndpointTool {
public GetLyrics(GeniusTools geniusTools) {
@@ -56,6 +70,8 @@ public class GetLyrics extends GeniusEndpointTool {
String lyrics_path = obj.getJSONObject("response").getJSONObject("song").getString("url");
try {
// WARNING: This request scrapes the lyrics from the Genius website.
// Which is against their Terms of Service. Use responsibly
Document doc = Jsoup.connect(lyrics_path)
.userAgent("insomnia/11.1.0") // TODO: replace with somthing else then insomnia! since we in no way support what ever Insomnia's User-Agent says we do
.header("host", "genius.com")

View File

@@ -10,6 +10,14 @@ While the primary goal is providing a somewhat more modular frontend for Ollama,
simple examples are in the Display module where i gave it the ability to access python through docker and get the current date and time both with the [OllamaFunctionTool](https://server.4zellen.se:3000/Zacharias/chat_thing/src/branch/master/Core/src/main/java/me/zacharias/chat/ollama/OllamaFunctionTool.java) thru my Ollama framework
## Legal Notice Regarding Scraping
A submodule of this project includes functionality that scrapes song lyrics directly from Genius.com, which violates Genius API's Terms of Service.
The author **does not endorse or encourage** scraping or any other use that violates third-party terms or copyright laws.
Use this software **at your own risk**. The author disclaims any liability for legal or technical consequences arising from its use.
## API
The documentation for the API is available at the gitea wiki under [API docs](https://server.4zellen.se:3000/Chat_things/NeuroDock/wiki/API-Docs)

View File

@@ -3,5 +3,12 @@ include 'API', 'Core', 'Display', 'launcher'
include 'MALAPITool'
/**
* LEGAL WARNING:
* This module contains code that scrapes lyrics from Genius.com, which is against Genius API's Terms of Service.
*
* If you wish to avoid any potential legal issues, comment out or remove the line below and ensure no modules depend on this.
* The core NeuroDock system will still function without this module.
*/
include 'GeniusAPI'
include 'WikipediaTool'