Felix Felix - 1 month ago 17
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

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:

Comments