cdherold has asked for the wisdom of the Perl Monks concerning the following question:
I once again return to the monastery for monk wisdom.
I have been working with WWW::Mechanize. My goal is to browse through my brokerage account and scrape pages and fill our forms to get stock information. I realize I have a lot of challenging work before me in terms of dealing with returned cookies and such in order to finally get in. All I want to get to right now is the point where I can see that I have pulled down the logon page and actually submit my user/pass. Then I can worry (and learn) about the cookies and other verification issues that need to be addressed.
I have read over Mechanize and see its power, but must confess my general lack of fluency with object oriented programming. I have mostly been using perl for link extraction and regex.
So now I am trying to learn some new stuff.
So I know where to start (straight from the docs with simple modifications) ...
In the above code I was trying to get a view of the url text that (I had hoped) was extracted.use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $url = "http://www.omniomix.com"; $mech->get( $url ); $mech->content( format => "text" ); print $mech;
I got ...
Can't locate HTML/TreeBuilder.pm in @INC [...] at /usr/lib/perl5/site_ +perl/5.8.3/WWW/Mechanize.pm line 496.
And when I do this ...
I get this ...my $res = $ua->request(HTTP::Request->new(GET => "http://www.yahoo.no" +)); print $res;
LWP::UserAgent=HASH(0x8a415e8)HTTP::Response=HASH(0x8c1df48)
dudes, monks, I am lost.
Any words of wisdom that might help me in my quest would be greatly appreciated.
Thanks Monks,
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Working with WWW::Mechanize
by svenXY (Deacon) on Sep 16, 2005 at 07:32 UTC | |
Re: Working with WWW::Mechanize
by ikegami (Patriarch) on Sep 16, 2005 at 06:50 UTC | |
Re: Working with WWW::Mechanize
by chb (Deacon) on Sep 16, 2005 at 07:27 UTC | |
Re: Working with WWW::Mechanize
by dn (Acolyte) on Sep 16, 2005 at 11:43 UTC | |
by singingfish (Novice) on Sep 19, 2005 at 12:19 UTC | |
Re: Working with WWW::Mechanize
by Akhasha (Scribe) on Sep 17, 2005 at 22:12 UTC |