Re: Following links: What's wrong with me????



Li, Jialin wrote:

On Sun, Apr 27, 2008 at 7:28 AM, J. Peng <peng.kyo@xxxxxxxxx> wrote:

On Sun, Apr 27, 2008 at 2:52 AM, hotkitty <stpra123@xxxxxxxxx> wrote:

This is my first experience w/ PERL and I've searched everywhere but
haven't found the answer. As an example, how do I simply open a
webpage (www.bloomberg.com) then click on each link within that
webpage that contains "Calpers Chief Buenrostro" and then click on
each link in that link that contains "Frederick of Schwab"?

WWW::Mechanize is useful for your purpose. See:
http://search.cpan.org/~petdance/WWW-Mechanize-1.34/lib/WWW/Mechanize.pm<http://search.cpan.org/%7Epetdance/WWW-Mechanize-1.34/lib/WWW/Mechanize.pm>

And see the example usages of this module:

http://search.cpan.org/~petdance/WWW-Mechanize-1.34/lib/WWW/Mechanize/Examples.pod<http://search.cpan.org/%7Epetdance/WWW-Mechanize-1.34/lib/WWW/Mechanize/Examples.pod>

From my experience, Mechanize is much easier to use than LWP.

(Please bottom-post your replies to this group, so that extended threads can remain comprehensible. Thank you.)

WWW::Mechanize is a subclass of LWP::Useragent, intended to add Web browser-like functionality to the facilities in LWP. It isn't intended as a replacement, and is of little use unless you need to emulate the use of browser software programmatically. Note that it provides no support either for JavaScript or for the non-standard features in Internet Explorer such as Active-X controls.

Rob
.



Relevant Pages

  • Following links: Whats wrong with me????
    ... This is my first experience w/ PERL and I've searched everywhere but ... webpage that contains "Calpers Chief Buenrostro" and then click on ... each link in that link that contains "Frederick of Schwab"? ...
    (perl.beginners)
  • Re: pagination of dbi results on html browser
    ... this was pretty much how my first experience with Perl ... I'm Java certified and use it in my job pretty regularly, ... > studying the basic concepts of command-line programming with Perl, ...
    (perl.beginners)