Skip to content

skuill/LyricsScraperNET

Repository files navigation

LyricsScraperNET

CodeFactor CI/CD LyricsScraperNET LirycsScraperNET License

LyricsScraperNET is a library for .NET that provides an API to search for lyrics of a song from the web.

Features

  • ✅ Supports multiple frameworks .NET Standard 2.X, .NET 5, .NET 6, .NET 7, .NET 8
  • ✅ Logging supported.
  • ✅ Modular structure, for easy testing.
  • ✅ Multiple ways how to configure.
  • ✅ Easily installed and used from the nuget repository.

Supported external lyrics providers

Example

A simple way to initialize through a parameterless constructor with the addition of the all available lyric providers:

using LyricsScraperNET;
using LyricsScraperNET.Models.Requests;

class Program
{
    static async Task Main()
    {
        // Create instance of LyricScraperClient with different lyrics 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);
    }
}

There are also extension methods for setting up LyricScraperClient as IServiceCollection that stored in some IConfiguration.

More examples can be found in example project: LyricsScraperNET.Client

Contributing and Feedback

Feel free to send me feedback on Telegram.

You are more than welcome to contribute to this project. Fork and make a Pull Request, or create an Issue if you see any problem or want to propose a feature.

Support

If you want to support this project or my work in general, you can donate via the link below.

This will always be optional! Thank you! 😉

  • "Buy Me A Coffee"
  • "Tinkoff Donate Button"