pythongoogle-chromeheadless-browserembedded-browser

Creating a headless Chrome instance in Python


This question describes my conclusion after researching available options for creating a headless Chrome instance in Python and asks for confirmation or resources that describe a 'better way'.

From what I've seen it seems that the quickest way to get started with a headless instance of Chrome in a Python application is to use CEF (http://code.google.com/p/chromiumembedded/) with CEFPython (http://code.google.com/p/cefpython/). CEFPython seems premature though, so using it would likely mean further customization before I'm able to load a headless Chrome instance that loads web pages (and required files), resolves a completed DOM and then lets me run arbitrary JS against it from Python.

Have I missed any other projects that are more mature or would make this easier for me?


Solution

  • Any reason you haven't considered Selenium with the Chrome Driver?

    http://code.google.com/p/selenium/wiki/ChromeDriver

    http://code.google.com/p/selenium/wiki/PythonBindings