Hello Monks! This script is supposed to import the url's html into a var so I can use tokeparser to get all the options from it. Only problem is that the rendered html source I get from a browser (when I'm debugging, checking out the site) isn't the same as what I get from my perl script. What my script seems to be getting (if you see in the html file it outputs) is simple script tags that load the ASPX modules. I'm looking for a way to get the HTML I need to run the rest of my script from this url. Should I use another library (since WWW::Mechanize doesn't do javascript), or is there a clever solution that I'm forgetting ?
use HTML::TokeParser; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); my $stream = HTML::TokeParser->new(\$html); $url = "https://catalog.amherst.edu/amherst/frmCourseSearch.aspx?FormT +ableName=CourseSearch"; $mech->get($url); $html = $mech->content(); open HTML ,'>>html.html'; print HTML $html;

In reply to WWW::Mech and ASPX by uni_j

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.