[CHANGE] Split up json parsing, added getting account info
This commit is contained in:
12
Manager.YouTube/Parsers/Json/JsonParser.cs
Normal file
12
Manager.YouTube/Parsers/Json/JsonParser.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.Text.Json;
|
||||
using Manager.YouTube.Models.Innertube;
|
||||
|
||||
namespace Manager.YouTube.Parsers.Json;
|
||||
|
||||
public static class JsonParser
|
||||
{
|
||||
public static List<WebImage> ParseImages(JsonElement.ArrayEnumerator array) =>
|
||||
array
|
||||
.Select(image => new WebImage { Width = image.GetProperty("width").GetInt32(), Height = image.GetProperty("height").GetInt32(), Url = image.GetProperty("url").GetString() ?? "" })
|
||||
.ToList();
|
||||
}
|
Reference in New Issue
Block a user