(let (i o) (connect-socket url* 80) (disp (readline i)))
(mac w/url (var url . body) `(let ,var (cadr (get-request (str->url ,url))) ,@body)))
-----
I'm not familiar with how to use xml.arc but this is what I came up with for finding the links on a page:
(def find-links (str) (with (start 0 acc nil) (whilet p (posmatch " href=" str start) (= start (+ p (if (in (str (+ p 6)) #\' #\") 7 6))) (push (cut str start (pos [in _ #\' #\" #\> #\space] str start)) acc)) (rev acc))) (w/url u "http://www.google.com/" (find-links u))