Anonymous user
Rosetta Code/Count examples: Difference between revisions
m
→{{header|OCaml}}: handle 404
m (→{{header|OCaml}}: handle 404) |
|||
Line 439:
let f = function
| Xml.Element ("cm", attrs, _) ->
(try
let
let title = repl_quote (repl_space _title) in
let url = "http://www.rosettacode.org/w/index.php?title="^ title ^"&action=raw" in
let n = count_ex (http_get url) in
total := n + !total;
with Http_client.Http_error (404, _) -> ())
| _ -> ()
in
|