You need JavaScript Engine to parse and run JavaScript code inside the page.
There are a bunch of headless browsers that can help you
http://code.google.com/p/spynner/
http://github.com/ryanpetrello/python-zombie
http://webscraping.com/blog/Scraping-JavaScript-webpages-with-webkit/