driver = webdriver.Firefox(capabilities=d)
driver.get('http://foo.com')
for entry in driver.get_log('browser'):
    print(entry)
print() 
driver.quit()
Getting console.log output from Firefox with Selenium