cs 325 home


Assignment 3: Create a Lisp web client

Test do-http-request

AServe defines some functions for getting web pages. The simplest to use is do-http-request in the net.aserve.client package.

To try it, type

(net.aserve.client:do-http-request url)

to read a web page. Pick a page that's not too long. If it succeeds, you should get back a string with the contents of the entire page. If you get an error message, try another page. I've had some trouble with URL's that leave out the file name, though an address with search keys, such as you see on Google, should work.

Get and test parse-html

Get the open source version of the HTML and XML parsers from http://opensource.franz.com. They come in one archive. Extract the files into your CS 325 library. The file with the HTML parser to load is phtml.cl.

Now do

(net.html.parser:parse-html (do-http-request ...))

to test parsing the HTML returned by the URL you tried before. You should get back a list version of the page, i.e., a version you can process with standard Lisp list functions.

Submit Report

Email to c25@cs.northwestern.edu

Where to get help

As before, the best source of help will be the CS 325 Blackboard site.


Comments? Send mail to Chris Riesbeck.