Revered monks, I desperately need your advice on how I should scrape from pages with lots of javascript created HTML. So far I have learnt the ways of Mechanize::Firefox and its interaction with MozRepl. The trouble is that I need it to run in a headless environment. I could run Firefox under xvfb, but I don't know how to install the MozRepl extention in a headless environment. It also seem very heavy weight to run the entire Firefox application. Do you have any advice on a simpler method that would allow me to get the rendered HTML of a page? Or should I just suck it up and use MozRepl and figure out how to get it working in a headless environment. Thank you for your wisdom

In reply to Suggestions for headless crawling by vijneedshelp

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.