scraping VZB network latency tables in F#



yesterday for work (and reddit's /r/dailyprogrammer) i wrote a small HTML table scraper in F#. i could have used some of the HTML tools (like an HTML provider, or the Html PowerPack) but i chose to do it with only regexes. data pipelines are now super easy. the pieces are below, and the example program will spit out some latencies. you can easiy compose new ones.



to get all latency tables, here's a start. transforming it to something else is an exercise left to the reader.

html |> tables |> List.filter (fun x -> x.IndexOf("Latency") > 0) |> List.map (fun x -> rows x |> List.filter (fun x -> x.IndexOf(" List.map (fun x -> cells x |> List.map (fun x -> stripHtml x) ))

comments

     [link]     Tuesday, Dec 16, 2014 @ 10:34am


Marketplace Music: Monday December 15 2014





This post autogenerated ...

     [link]     Monday, Dec 15, 2014 @ 10:33pm


Marketplace Music: Friday December 12 2014





This post autogenerated ...

     [link]     Friday, Dec 12, 2014 @ 10:33pm


Marketplace Music: Thursday December 11 2014





This post autogenerated ...

     [link]     Thursday, Dec 11, 2014 @ 10:33pm


Marketplace Music: Wednesday December 10 2014





This post autogenerated ...

     [link]     Wednesday, Dec 10, 2014 @ 10:33pm


Marketplace Music: Tuesday December 9 2014





This post autogenerated ...

     [link]     Tuesday, Dec 09, 2014 @ 10:33pm


Marketplace Music: Monday December 8 2014





This post autogenerated ...

     [link]     Monday, Dec 08, 2014 @ 10:33pm


Marketplace Music: Wednesday December 3 2014





This post autogenerated ...

     [link]     Wednesday, Dec 03, 2014 @ 10:33pm