Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: WWW::Mechanize v.s .JSP Web Control

by whakka (Hermit)
on Jun 03, 2009 at 18:21 UTC ( #768106=note: print w/ replies, xml ) Need Help??

in reply to WWW::Mechanize v.s .JSP Web Control

As mentioned, you simply need to figure out what the server is doing. Live HTTP Headers is a good way.

The following just selects Accounting courses:

my $ua = WWW::Mechanize->new; my $res = $ua->post( '', Content => 'term=200901&GUPgroup=A&CourseNumber=&ProgramSubject=AC +CT&InstructorName=&timeRangeFrom=08&timeRangeTo=21&ExactWordPhrase=&y +cRules=new&distributionGroupOperator=AND&Submit.x=145&Submit.y=7' ); $ua->follow_link( tag => 'frame', name => 'resultFrame' ); $ua->follow_link( tag => 'frame', name => 'resultList' ); print $ua->content;
Now you can parse the html to get at the information; it's the second table in the body.

Comment on Re: WWW::Mechanize v.s .JSP Web Control
Download Code
Re^2: WWW::Mechanize v.s .JSP Web Control
by uni_j (Acolyte) on Jun 03, 2009 at 19:42 UTC
    This is really helpful thanks :) I'm actually trying to get the data from the combobox that is in the jsp control (Program/subject), but the html is rendered afterwards (so my perl gets a big blank void :P). If posting all the header information verbatim will do the trick, this will be a trick I will do. Thanks whakka great reply !

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://768106]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2015-03-04 07:04 GMT
Find Nodes?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:

    Results (98 votes), past polls