fix build

This commit is contained in:
Simon Cruanes 2019-09-14 12:30:53 -05:00
parent 863a6263bb
commit 8ee9668441
2 changed files with 7 additions and 3 deletions

View file

@ -121,6 +121,11 @@ module Run = struct
end end
let help_str =
{|A web crawler that can typically be found in Texas.
usage: argiope url [url*] [option*]
|}
let () = let () =
let domains = ref Str_set.empty in let domains = ref Str_set.empty in
@ -134,9 +139,9 @@ let () =
"--max", Arg.Set_int max_, " max number of pages to explore"; "--max", Arg.Set_int max_, " max number of pages to explore";
"-j", Arg.Set_int j, " number of jobs (default 20)"; "-j", Arg.Set_int j, " number of jobs (default 20)";
] |> Arg.align in ] |> Arg.align in
Arg.parse opts (CCList.Ref.push start) "usage: crawler url [url*] [option*]"; Arg.parse opts (CCList.Ref.push start) help_str;
if !start = [] then ( if !start = [] then (
failwith "need at least one initial URL" Arg.usage opts help_str;
) else ( ) else (
let start = List.map Uri.of_string !start in let start = List.map Uri.of_string !start in
let default_host = match Uri.host @@ List.hd start with let default_host = match Uri.host @@ List.hd start with

View file

@ -1,6 +1,5 @@
(executable (executable
(name argiope) (name argiope)
(synopsis "A web crawler that can typically be found in Texas")
(modes native) (modes native)
(libraries uri lambdasoup lwt ezcurl-lwt containers)) (libraries uri lambdasoup lwt ezcurl-lwt containers))