I would like to write an OCaml function which takes a URL and returns a string made up of the contents of the HTML file at that location. Any ideas?
Thanks a lot!
Best,
Surikator.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve done both of those things using ocurl and nethtml
ocurl to read the contents of the URL (tons of properties here; this is the minimum),
and from nethtml; (you might need to set up a DTD for
Nethtml.parse)Cheers!