Take a look at Selenium. I haven't used it for scraping, but <span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; ">Björn Mårtensson has used it for scraping dynamically built javascript pages.
<br></span><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"><br class="webkit-block-placeholder"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"><a href="http://www.openqa.org/selenium-ide/">
http://www.openqa.org/selenium-ide/</a></p><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "><a href="http://www.jroller.com/bjornmartensson/entry/web_scraping_in_early_2007">http://www.jroller.com/bjornmartensson/entry/web_scraping_in_early_2007
</a></span></div><div><br class="webkit-block-placeholder"></div><div>All the best,</div><div>Brian Tatnall</div><div><br><div><span class="gmail_quote">On 11/12/07, <b class="gmail_sendername">David Young</b> <<a href="mailto:davidy@nationalcycle.com">
davidy@nationalcycle.com</a>> wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br><br>I'm on another mailing list of colleagues, and this question came up. What
<br>would you all recommend?<br><br>Ydy<br><br><br>-----Original Message-----<br>Sent: Monday, November 12, 2007 10:32 AM<br>To: techies@xxxxxxxxxxxxxxxxxxxx<br>Subject: How would you do this?<br><br>More and more, I'm finding the need to do some page-scraping of web pages
<br>that are Web 2.0-ey.<br><br>My normal scraping tool is perl's WWW::Mechanize and such. But it is<br>completely javascript brain-dead.<br><br>For example...I'd like to write something that goes to YouTube, looks up
<br>a set of videos, analyzes the comments and ratings, and presents a<br>summary report. That's just an example of something that is conceptually<br>simple (easily done manually) but can't be done with WWW::Mechanize.
<br><br>So if you wanted to do something like that, what would you use?<br><br>I'm not adverse to using something other than perl...something Windows-based<br>would be my last resort. I'd consider a commercial product, though
<br>preferably not a multi-hundred-dollar one...<br><br>Obviously, something that submits as well as scrapes would be ideal.<br><br><br><br><br><br>_______________________________________________<br>Chicago-talk mailing list
<br><a href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/chicago-talk">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br></blockquote></div><br> </div></div>