Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Web-scraping/F-Sharp/web-scraping.fs
Normal file
11
Task/Web-scraping/F-Sharp/web-scraping.fs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
open System
|
||||
open System.Net
|
||||
open System.Text.RegularExpressions
|
||||
|
||||
async {
|
||||
use wc = new WebClient()
|
||||
let! html = wc.AsyncDownloadString(Uri("http://tycho.usno.navy.mil/cgi-bin/timer.pl"))
|
||||
return Regex.Match(html, @"<BR>(.+ UTC)").Groups.[1].Value
|
||||
}
|
||||
|> Async.RunSynchronously
|
||||
|> printfn "%s"
|
||||
Loading…
Add table
Add a link
Reference in a new issue