Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I'm currently new to using WWW::Mechanize and am using it to build a web scraping tool that will go onto a school website and pull course data so that the website I'm building can recognize conflicts. I currently have this code in Perl:

#!/user/bin/perl use warnings; use strict; use WWW::Mechanize; my $browser = WWW::Mechanize->new; $browser->get( 'https://registrar.ucdavis.edu/courses/search/index.cfm +'); $browser->form_number(3); #Search Form $browser->select('subject', 'AAS'); $browser->submit(); print $browser->content();

The way the website works, you go in, select a subject area, and then click "Search". Then a table populates based off what you selected in the forms above.

I'm currently focused on just getting my script to select one option from the dropdown menu, click "Search" and then copy the results, but for one, I'm not sure if it's actually working (It's not giving me any errors, but I'm not sure it's doing anything) and two, I'm not sure how to view the data that pops up in the table. Any help would be appreciated!


In reply to WWW::Mechanize Webcrawler by Thoery55

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-29 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found