Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Using perl for web actions

by perlcub (Initiate)
on Sep 03, 2012 at 10:30 UTC ( #991388=perlquestion: print w/ replies, xml ) Need Help??
perlcub has asked for the wisdom of the Perl Monks concerning the following question:

First timer and an absolute perl novice who has a MASSIVE(my POV) task at hand. Need to write a script to: 1. Go to a website 2. Log in 3. Click a particular button 4. Modify the pop up form (that has drop downs too) 5. Submit The catch is - No using WWW::Mechanize. Can only use LWP and HTTP modules. Help!!

Comment on Using perl for web actions
Re: Using perl for web actions
by perlcub (Initiate) on Sep 03, 2012 at 10:40 UTC

    And just to add I can't use Win32 either. Using perl on Linux.

Re: Using perl for web actions
by marto (Bishop) on Sep 03, 2012 at 10:44 UTC

    Use Wireshark to find out what a real browser sends when performing these tasks, automate with LWP (see also lwptut). Failing that consider removing the WWW::Mechanize restriction.

Re: Using perl for web actions
by Khen1950fx (Canon) on Sep 03, 2012 at 10:53 UTC
    Why can't you use Mechanize?
      Perhaps because that's what the teacher said in creating this "MASSIVE... task" ... to focus learning on the allowed modules?
        It would have been kind of nice if you told the Monastery beforehand this is a homework assignment.

        Update: How strange. I definitely recall having answered on a post from the OP, but that post now seems gone.

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        My blog: Imperial Deltronics
Re: Using perl for web actions
by Corion (Pope) on Sep 03, 2012 at 10:55 UTC

    Also see Yes, even you can use CPAN. There is very little reason not to use WWW::Mechanize, especially if you already have LWP available.

Re: Using perl for web actions
by Anonymous Monk on Sep 03, 2012 at 16:26 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2014-12-25 06:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls