Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

My First HTML/Web based script.

by Anonymous Monk
on Oct 24, 2003 at 14:56 UTC ( [id://301860]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

O’ holly brethren and systers;

I am totally a newbie to this area, so I thought the best way to learn quickly is to take things step by step.

So to start off with I need help to script these steps; fire Internet explorer application, then browse to www.google.com. Then in search field enter my search parameter (some text). Hit the "google search" button. And finally, gather the returned information into an array.

Simple it may be, but this is the best way to start for me off with web based stuff. Because If I can achieve this then I could use the same script skeleton to achieve many other tasks that are more complex. At this stage I am not sure which module to use (HTML::Parser or HTML::Form, or shall I use php or stick with perl...etc)I prefere Perl but would also like to learn php. I, also can’t find any code examples that fits the above to work on.

Your help and suggestions are highly appreciated.

Many thanks.

Replies are listed 'Best First'.
Re: My First HTML/Web based script.
by gjb (Vicar) on Oct 24, 2003 at 15:02 UTC

    I'd point you to WWW::Mechanize which is very good for this kind of thing.

    Incidently, note that the terms of service of Google prohibits automatic use, and they check, so don't do too many queries this way (thanks bunnyman for providing the link to the terms of service document).

    Hope this helps, -gjb-

    Update: I realized I could give you a complete example to get you started, see below.

      note that the license agreement of Google prohibits automatic use

      They allow 1000 queries per day via SOAP - see Google APIs.

Re: My First HTML/Web based script.
by mcogan1966 (Monk) on Oct 24, 2003 at 18:07 UTC
    I'm making my own multi-headed search engine.
    I'm grabbing my results from each engine using LWP.
    You might want to look at that too.
Re: My First HTML/Web based script.
by sunadmn (Curate) on Oct 24, 2003 at 16:55 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://301860]
Approved by gjb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-03-29 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found