Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I crawl a site with dynamic forms using WWW::Mechanize?
    primarykey
    data
    text
    <p>I like to retrieve and store the values of an HTML table from a Web site which uses some Javascript and has an URL which ends on <code>.aspx</code>, by writing a Web crawler in Perl.</p> <p>The <a href="http://www.comelec.gov.ph/results/2004natl/2004electionresults_local.aspx" rel="nofollow">Web site</a> provides some data on election results.</p> <p>You have a search form with two options as drop down menus, Province <code>provlist</code> and City/Municipality <code>munlist</code>.</p> <ul> <li>You choose the Province. The web page gets reloaded to the same URL and changes the list of available options of the second drop down menu, i.e. City/Municipality.</li> <li>Now you can choose your City/Municipality and after clicking the button SEARCH, a HTML table becomes visible with the results.</li> </ul> <p>I like to retrieve all these tables and their results.</p> <p>I like to do it with Perl, however so far I have only written very small/simple scripts. It would be very helpful if you have some general informations on how I should start this task.</p> <ol> <li>I have used some of the <code>WWW::Mechanize</code> functions before, only a few though. Can I do this job with the <code>WWW::Mechanize</code> functions, are these functions sufficient? Or do I need additional packages?</li> <li><p>The FAQ for <code>WWW::Mechanize</code> states that it has some problems with Javascript. However, in another post I read it may be possible to avoid the this Javascript. Does the called Javascript function for one of the drop down menus cause a problem?</p> <pre><code>&lt;select name="provlist" onchange="javascript:setTimeout('__doPostBack(\'provlist\',\'\')', 0)" id="provlist" tabindex="1"&gt; </code></pre></li> <li><p>How troublesome is the ASPX framework?</p></li> </ol> <p>As I have said before, I only have a little experience with writing Perl crawlers, so any information/hints/etc. you can provide are highly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload