title: How to grab headers in python selenium-webdriver
body: <p>I am trying to grab the headers in selenium webdriver. Something similar to the following:</p>
  
  <pre><code>&gt;&gt;&gt; import requests
  &gt;&gt;&gt; res=requests.get('http://google.com')
  &gt;&gt;&gt; print res.headers
  </code></pre>
  
  <p>I need to use the <code>Chrome</code> webdriver because it supports flash and some other things that I need to test a web page. Here is what I have so far in Selenium:</p>
  
  <pre><code>from selenium import webdriver
  driver = webdriver.Chrome()
  driver.get('https://login.comcast.net/login?r=comcast.net&amp;s=oauth&amp;continue=https%3A%2F%2Flogin.comcast.net%2Foauth%2Fauthorize%3Fclient_id%3Dxtv-account-selector%26redirect_uri%3Dhttps%3A%2F%2Fxtv-pil.xfinity.com%2Fxtv-authn%2Fxfinity-cb%26response_type%3Dcode%26scope%3Dopenid%2520https%3A%2F%2Flogin.comcast.net%2Fapi%2Flogin%26state%3Dhttps%3A%2F%2Ftv.xfinity.com%2Fpartner-success.html%26prompt%3Dlogin%26response%3D1&amp;reqId=18737431-624b-44cb-adf0-2a85d91bd662&amp;forceAuthn=1&amp;client_id=xtv-account-selector')
  driver.find_element_by_css_selector('#user').send_keys('XY@comcast.net')
  driver.find_element_by_css_selector('#passwd').send_keys('XXY')
  driver.find_element_by_css_selector('#passwd').submit()
  print driver.headers ### How to do this?
  </code></pre>
  
  <p>I have seen some other answers that recommend running an entire selenium server to get this information (<a href="https://github.com/derekargueta/selenium-profiler">https://github.com/derekargueta/selenium-profiler</a>). How would I get it using something similar to the above with Webdriver?</p>