MelonChart.NET
1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MelonChart.NET --version 1.0.1
NuGet\Install-Package MelonChart.NET -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MelonChart.NET" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MelonChart.NET --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MelonChart.NET, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MelonChart.NET as a Cake Addin #addin nuget:?package=MelonChart.NET&version=1.0.1 // Install MelonChart.NET as a Cake Tool #tool nuget:?package=MelonChart.NET&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MelonChart.NET
This is the Melon chart scraping library written in .NET - Top 100, Hot 100, Daily, Weekly and Monthly
Prerequisites
- .NET 8.0 or later
- Visual Studio 2022 17.0+ or Visual Studio Code 1.80+ with C# Dev Kit
Getting Started
Install the NuGet package of this library.
dotnet add package MelonChart.NET
You may need to run the following command to install Playwright dependencies.
pwsh bin/Debug/net8.0/playwright.ps1 install
Use the library in your code.
var chart = new Top100Chart(); var collection = await chart.GetChartAsync(); foreach (var item in collection.Items) { Console.WriteLine($"{item.Rank} - {item.Title} by {item.Artist}"); }
If you want to get the Hot 100 chart, use the
Hot100Chart
class.var chart = new Hot100Chart(); var collection = await chart.GetChartAsync(); foreach (var item in collection.Items) { Console.WriteLine($"{item.Rank} - {item.Title} by {item.Artist}"); }
You can also register all the charts and get the chart by the type.
var builder = WebApplication.CreateBuilder(args); builder.Services.AddKeyedScoped<IChart, Top100Chart>(ChartTypes.Top100); builder.Services.AddKeyedScoped<IChart, Hot100Chart>(ChartTypes.Hot100); builder.Services.AddKeyedScoped<IChart, Daily100Chart>(ChartTypes.Daily100); builder.Services.AddKeyedScoped<IChart, Weekly100Chart>(ChartTypes.Weekly100); builder.Services.AddKeyedScoped<IChart, Monthly100Chart>(ChartTypes.Monthly100); var app = builder.Build(); app.MapGet("/top100", async ([FromKeyedServices(ChartTypes.Top100)] IChart chart) => { var collection = await chart.GetChartAsync(); return Results.Json(collection.Select(p => new { p.Rank, p.Title, p.Artist })); }); app.MapGet("/hot100", async ([FromKeyedServices(ChartTypes.Hot100)] IChart chart) => { var collection = await chart.GetChartAsync(); return Results.Json(collection.Select(p => new { p.Rank, p.Title, p.Artist })); }); app.MapGet("/daily100", async ([FromKeyedServices(ChartTypes.Daily100)] IChart chart) => { var collection = await chart.GetChartAsync(); return Results.Json(collection.Select(p => new { p.Rank, p.Title, p.Artist })); }); app.MapGet("/weekly100", async ([FromKeyedServices(ChartTypes.Weekly100)] IChart chart) => { var collection = await chart.GetChartAsync(); return Results.Json(collection.Select(p => new { p.Rank, p.Title, p.Artist })); }); app.MapGet("/monthly100", async ([FromKeyedServices(ChartTypes.Monthly100)] IChart chart) => { var collection = await chart.GetChartAsync(); return Results.Json(collection.Select(p => new { p.Rank, p.Title, p.Artist })); });
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- Microsoft.Playwright (>= 1.44.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.