Felix Felix - 1 year ago 263
Python Question

Python browser emulator with JS support

I want to grab some data from a site. Usually I use

mechanize
for such things, but now the site gives the data with JS. Alas,
mechanize
doesn't support it.

What can I use instead?

Answer Source

Here are some options:

  1. Selenium (tutorial)
    • For headless automation, Selenium can be used in conjunction with PhantomJS
  2. WebKit
  3. Spidermonkey

Here are some code examples: