Even if you can run JavaScript within your script via something like
JavaScript::SpiderMonkey,
it will still be a challenge to understand the browser's DOM completely. JavaScript itself doesn't know what an "onClick" event is, it's just a language. Only in combination with the browser's DOM you get this powerful browser-scripting ability. I heard that leira is working on something like that.
Until then, I'd recommend using a logging proxy like proxy.pl. Just start it on the command line like
./proxy.pl
and when it says Server listening at port 8017, point your browser to it via Preferences-Advanced-Proxies, where you click on Manual Proxy Configuration and set the HTTP proxy entry to localhost and port 8017.
With this enabled, the logging proxy will tell you exactly what he browser sends over the wire when you're surfing, and you can simply wrap its output into a WWW::Mechanize script.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.