Re: [netcomics-devel] Cookie support?
Brought to you by:
elliotglaysher,
hochstrb
|
From: Chris H. <ho...@re...> - 2005-02-25 06:07:51
|
: site a particular cookie. Any idea if this is even feasible? I don't
: know enough about the libwww-perl library to know where to start. I
: know that both wget and curl support cookies, at least from a
: Netscape-style cookies.txt. Any comments?
Adding an option to support cookies should be fairly straight forward.
LWP can handle cookies; When the LWP::UserAgent object is constructed,
you can specify an HTTP::Cookie object. the default class uses a
proprietary format, but the LWP package comes standard with
HTTP::Cookies::Netscape which supports the more traditional file people
are used to (there's also a seperate HTTP::Cookies::Mozilla available, but
i'm not sure what the differenes are)
making the change to Netcomics::Factory to construct a new cookie object
and pass it to the $ua object should be fairly easy (search 'perldoc
LWP::UserAgent' for 'cookie_jar'). the hard part is deciding wether you
wnat to support multiple file formats or not.
Netcomics::ExternalUserAgent contains the wget command line used if the
person doesn't have LWP installed. you can add the neccessary options
there.
--
-------------------------------------------------------------------
"Oh, you're a tricky one." Chris M Hostetter
-- Trisha Weir ho...@re...
|