I am currently trying to create a simple F# function that can given a URL to a html site, count all the links present.
I know that it can be done somehow through counting the number of <a substrings, but not sure on how to actually search through the site and so on.
Any help is greatly appreciated.
You can use HtmlParser
from FSharp.Data package.
open FSharp.Data
let doc = HtmlDocument.Load "https://en.wikipedia.org/wiki/F_Sharp_(programming_language)"
let linksCount = doc.Descendants ["a"] |> Seq.length