[NBLUG/talk] Perl mod question - Cookies.pm
Mark Street
mark at oswizards.com
Tue Jun 7 13:46:06 PDT 2005
Thanks for the tip Rich, Mechanize almost does what I need but lacks the
ability to add 'content' to a request. The Mechanize::Shell is pretty cool
too! The agent trips the javascript sniffer up and it re-directs to
non-supported browser. I can fool it if I can insert the proper content into
the next request. This works with LWP UserAgent but not with Mechanize.
mech can do headers and cookies really well.
$req2->header('Content-Length' => '89');
$req2->content('JScriptTest=ENABLED&CookieTest=ENABLED&HelpField=5&Flag=1);
So, I am continuing to make progress slowly inching my way in.
To tell you the truth, I don't think it was the format of the cookie it was
probably the coder in a moment of panic and frustration.
On Friday 03 June 2005 09:17, Rich Gibson wrote:
> You might take a look at the WWW::Mechanize module. It makes it easy/ier
> to automate a lot of those tasks.
>
> On Fri, 3 Jun 2005, Mark Street wrote:
> > I am trying to program an automated perl script to interact with a remote
> > website... ASP.NET with lots of javascript...messy stuff. I first had to
> > run a web scraping proxy server on the site, then converted the requests
> > and responses to a perl script with a handy utility.
> >
> > The problem comes in when using the cookie_jar object. The Cookie.pm
> > perl module only handles Cookie and Cookie2 format. The site I am
> > interfacing with hands out Cookie3 format. I tried hacking Cookie.pm and
> > manually setting my headers in my requests in the perl script with
> > properly formatted cookies but I can only get so far into the site with
> > the mixture of techniques.
> >
> > Any ideas on ways to handle Cookie3 format with perl's Cookie.pm?
--
Mark Street, RHCE
http://www.oswizards.com
--
Key fingerprint = 3949 39E4 6317 7C3C 023E 2B1F 6FB3 06E7 D109 56C0
GPG key http://www.oswizards.com/pubkey.asc
More information about the talk
mailing list