Ben Scott wrote:
> On 12/7/06, Brian Chabot <[EMAIL PROTECTED]> wrote:
>> $auth = MIME::Base64::encode("$adminuser:$adminpass") || die "Error:
>> $!\n";
>> $mech->add_header (Authorization=>"Basic $auth") || die "Error: $!\n";
> 
>  You need to do this:
> 
> $mech->credentials ("username" => "password");

Well.. It didn't work, but we must have changed something... as the
error is identical.

That goes before $mech->get right?

...and from the docs, is it:
$mech->credentials ("username" => "password");
or
$mech->credentials ("username","password");
...or does it matter?


>  "Illegal seek"?  That's very strange.  Hmmmm... um, try the method
> above first.  Maybe we'll get lucky and that will work.  :)

No such luck...


>> The documentation for Mechanize could be a lot better.
> 
> http://search.cpan.org/dist/WWW-Mechanize/lib/WWW/Mechanize/Cookbook.pod
> 
> spells it out pretty clearly.

Not really.  (See above)

> The problem I had
> was getting decent diagnostics in the situation.  I ended up just
> calling out to "curl" to do the actual download.


If I had my way, I wouldn't need to use Mech at all.  I'd be accessing
the db directly and using PHP or just bash scripting with curl, too.
The job's requirements are where I need to scrape in perl...


Brian
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to