Skip to content

🎼LyricsScraperNET is a versatile .NET library that provides an API for searching song lyrics from the web.

License

Notifications You must be signed in to change notification settings

skuill/LyricsScraperNET

Repository files navigation

LyricsScraperNET

CodeFactor CI/CD LyricsScraperNET NuGet NuGet Downloads codecov License

LyricsScraperNET is a versatile .NET library that provides an API for searching song lyrics from various external providers.


🌟 Features

  • Multi-framework support: Compatible with .NET Standard 2.x, .NET 5, .NET 6, .NET 7, .NET 8.
  • Integrated logging: Effortless debugging and tracking.
  • Modular architecture: Highly testable and customizable.
  • Flexible configuration: Multiple ways to configure the library.
  • NuGet support: Easy installation from NuGet.

🎤 Supported Lyrics Providers

The library currently supports the following providers:


📋 Getting Started

Here’s a simple example to demonstrate how to initialize and use the library with all available providers:

using LyricsScraperNET;
using LyricsScraperNET.Models.Requests;

class Program
{
    static async Task Main()
    {
        // Create an instance of LyricScraperClient with all providers
        ILyricsScraperClient lyricsScraperClient = new LyricsScraperClient()
            .WithAllProviders();

        var searchRequest = new ArtistAndSongSearchRequest(
            artist: "Metallica", 
            song: "Nothing Else Matters"
        );

        var searchResult = lyricsScraperClient.SearchLyric(searchRequest);

        if (!searchResult.IsEmpty())
        {
            Console.WriteLine(searchResult.LyricText);
        }
    }
}

For more advanced usage, you can set up the LyricScraperClient via dependency injection (IServiceCollection) with configurations stored in IConfiguration.

Explore additional examples in the LyricsScraperNET.Client project.


🛠️ Installation

Install the package from NuGet:

dotnet add package LyricsScraperNET

🖋️ Contributing and Feedback

Contributions are welcome!

  • Fork the repository and create a Pull Request.
  • Report issues or propose features via the Issues tab.

For direct feedback, feel free to reach out on Telegram.


💖 Support

If you find this project helpful, consider supporting it:

  • Starring this repository on GitHub ⭐.
  • Buy Me A Coffee
  • Tinkoff Donate

Your support helps keep this project alive and evolving!


📜 License

This project is licensed under the MIT License.