mirror of
https://github.com/EpicMorg/atlassian-json.git
synced 2024-12-30 16:45:45 +03:00
16 lines
607 B
C#
16 lines
607 B
C#
#r "nuget: AngleSharp, 1.0.0-alpha-844"
|
|
|
|
using System.Linq;
|
|
|
|
System.Console.Out.WriteLine(
|
|
"download(" + System.Text.Json.JsonSerializer.Serialize(
|
|
new AngleSharp.Html.Parser.HtmlParser()
|
|
.ParseDocument(
|
|
await new System.Net.Http.HttpClient()
|
|
.GetStringAsync("https://www.sourcetreeapp.com/download-archives")
|
|
.ConfigureAwait(false))
|
|
.QuerySelectorAll(".wpl tr a")
|
|
.Select(row => new { Version = row.TextContent, ZipUrl = row.GetAttribute("href") })
|
|
.ToArray()) + ")"
|
|
);
|