Alex Rivera | Logout

Programmatic Python Browser with JavaScript

Asked 2009-12-16T18:37:08.033
14

I want to screen-scrape a web-site that uses JavaScript.

There is mechanize, the programmatic web browser for Python. However, it (understandably) doesn't interpret javascript. Is there any programmatic browser for Python which does? If not, is there any JavaScript implementation in Python that I could use to attempt to create one?

Edit
Report

3 Answers

2

You could also try defining Chickenfoot page triggers on the pages in question, executing whatever operations you want on the page and saving the results of the operation to a local file, and calling Firefox from the command line inside your program, followed by reading the file.

answered 2009-12-16T18:45:51.740
1

i recommend that you take a look at some of the options available to you at http://wiki.python.org/moin/WebBrowserProgramming - surprisingly this is coming up as a common question (i've found three on stackoverflow today, by searching for the words "python browser" on google). if you do the same you'll find the other answers i gave.

answered 2010-06-09T20:24:09.787
1
answered 2010-10-03T13:10:58.813

Your Answer