i know the question has been asked a few times before (
How to scrape an HTTPS website that has JavaScript,
Thwarting Screen Scrapers ), but neither one seems to hit on the part i need.
i've been tasked with screen-scraping what originally looked like an easy page, but it turns out the entire page is built with calls to Javascript's document.write. i suspect the engineers were trying to avoid screen scraping in the first place ...
I can get the information out of the page I need from a little bit of reverse-engineering and parsing an array of arrays (in Javascript). i've read through Javascript::Spidermonkey to see if this will DWIM ... but i can't tell from reading the perldoc if i can use Javascript::Spidermonkey to extract arrays from the page code, or if i'm going to have to resort to some brute-force parsing of the page.
is Javascript::Spidermonkey what i'm looking for in this case? or should i stick with some combination of something like WWW::Mechanize, LWP, etc ...
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.