atlassian-json/json-backups/sourcetreeapp-archive.csx

16 lines
612 B
Plaintext
Raw Normal View History

2021-01-17 02:20:03 +03:00
#r "nuget: AngleSharp, 1.0.0-alpha-844"
using System.Linq;
System.Console.Out.WriteLine(
2021-01-17 05:03:43 +03:00
"downloads(" + System.Text.Json.JsonSerializer.Serialize(
2021-01-17 02:20:03 +03:00
new AngleSharp.Html.Parser.HtmlParser()
.ParseDocument(
await new System.Net.Http.HttpClient()
.GetStringAsync("https://www.sourcetreeapp.com/download-archives")
.ConfigureAwait(false))
2021-01-17 04:56:24 +03:00
.QuerySelectorAll(".wpl tr div>a")
2021-01-17 02:20:03 +03:00
.Select(row => new { Version = row.TextContent, ZipUrl = row.GetAttribute("href") })
.ToArray()) + ")"
);