caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Karl Zilles <zilles@1969web.com>
To: Martin Chabr <martin_chabr@yahoo.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Get a page from the Web
Date: Mon, 07 Nov 2005 13:35:57 -0800	[thread overview]
Message-ID: <436FC8BD.90801@1969web.com> (raw)
In-Reply-To: <20051107211906.14100.qmail@web26810.mail.ukl.yahoo.com>

Martin Chabr wrote:
> I have been looking for ways to get a page in HTML
> from the Web, using an OCaml program, something like
> the following Python snippet:
> 
> import urllib
> URL = "http://www.ibm.com"
> url = urllib.urlopen(URL)
> html = url.read()
> 
> You supply the URL and receive the page in HTML. Is
> there anything simple like that in OCaml?

I use the Ocaml binding to the curl library.  It has worked well for me 
and it can handle high level details like maintaining cookies across 
calls (for session continuity and logins):

http://sourceforge.net/projects/ocurl/


  reply	other threads:[~2005-11-07 21:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-07 21:19 Martin Chabr
2005-11-07 21:35 ` Karl Zilles [this message]
2005-11-07 22:10 ` [Caml-list] " Florian Weimer
2005-11-08 10:40   ` Richard Jones
2005-11-09 18:13     ` Ant: " Martin Chabr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=436FC8BD.90801@1969web.com \
    --to=zilles@1969web.com \
    --cc=caml-list@inria.fr \
    --cc=martin_chabr@yahoo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).