Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > LWP::UserAgent & Mechanize

Reply
Thread Tools

LWP::UserAgent & Mechanize

 
 
nyana
Guest
Posts: n/a
 
      08-01-2004
Obviously innefficient code because I am querying server twice:

my $ua = LWP::UserAgent->new;
my $response =
$ua->get("http://www.mlindex.ml.com/GISPublic/bin/SnapShot.asp");
$mech->get("http://www.mlindex.ml.com/GISPublic/bin/SnapShot.asp");

What can I use to store the contents of SnapShot.asp?

I tried:
$mech->get($response) and ...($ua).
$mech = $response and ...($ua).

maybe i should look at the mechanize.pm and see how it wants it ... after I
get so some sleap.

Thanks,
nyana


 
Reply With Quote
 
 
 
 
nyana
Guest
Posts: n/a
 
      08-01-2004
Some context:

$mech->get("http://www.mlindex.ml.com/GISPublic/bin/SnapShot.asp");
my $ua = LWP::UserAgent->new;
my $response =
$ua->get("http://www.mlindex.ml.com/GISPublic/bin/SnapShot.asp");
my $date = HTML::Form->parse($response->content,$response->base);
my $dvalue = $date->param('txtSSDate');

I need to use LWP to feed into HTML::Form. I know I could do the same thing
with HTML::Form alone, but I would still be calling the .asp twice...


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unistall python mechanize bruce Python 1 07-10-2006 08:48 PM
possible issue with mechanize/python parsing bruce Python 0 07-10-2006 05:12 AM
python guru for urllib/mechanize bruce Python 1 07-09-2006 03:03 PM
Mechanize-Browser question.. bruce Python 1 07-09-2006 02:19 PM
help with Perl Mechanize zoewu Perl 0 02-27-2004 08:43 PM



Advertisments