Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Web-scraping/OCaml/web-scraping.ocaml
Normal file
14
Task/Web-scraping/OCaml/web-scraping.ocaml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
let () =
|
||||
let _,_, page_content = make_request ~url:Sys.argv.(1) ~kind:GET () in
|
||||
|
||||
let lines = Str.split (Str.regexp "\n") page_content in
|
||||
let str =
|
||||
List.find
|
||||
(fun line ->
|
||||
try ignore(Str.search_forward (Str.regexp "UTC") line 0); true
|
||||
with Not_found -> false)
|
||||
lines
|
||||
in
|
||||
let str = Str.global_replace (Str.regexp "<BR>") "" str in
|
||||
print_endline str;
|
||||
;;
|
||||
Loading…
Add table
Add a link
Reference in a new issue