Anyone have Tcl code to let a client-side Tcl script properly accept
cookies from the server, and send them back?
This is for web scraping. Some sites check for or set various cookies
and refuse to show you a page (even an otherwise public page) if
cookies are not supported. So in many cases simply being able to
return statically defined cookies would be adequate, but ideally the
Tcl scraping script should be able to accept arbitrary cookies from
the server as well.
I thought this might be a standard part of tcllib or some other
package, but I haven't found anything on the net.
(cgi.tcl
might have something related to this, but I couldn't really tell for
sure, and I suspect not. It's intended for server-side CGIs, after
all.) I could roll my own, but it seems unlikely that someone
somewhere hasn't already done this...
This
comp.lang.tcl thread
does mention somebody doing it, but not providng any code, and there's
a
feature request
open for this.