Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by whakka (Hermit)
on Jun 03, 2009 at 18:21 UTC ( [id://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( 'http://students.yale.edu/oci/resultWindow.jsp', 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.

Replies are listed 'Best First'.
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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-23 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found