title: Python scraping google finance
body: <p>I am trying to scrape stock prices from google finance's <a href="https://www.google.com/finance/quote/AAPL:NASDAQ" rel="nofollow noreferrer">new interface</a>.
  I am using <code>xpath</code> to navigate to the location of the price, but upon printing it, it always returns a pair of square braces <code>[]</code>.</p>
  <p>I have tried fixing it but nothing seems to work, and it also does this for all of the other objects on the screen.</p>
  <pre><code>from lxml import html
  import requests
  import time
  
  def parse(ticker):
      url = &quot;http://google.com/finance?q=%s&quot;%(ticker)
      response = requests.get(url, verify=False)
      parser = html.fromstring(response.content)
      priceO = parser.xpath('//*[@id=&quot;fac-ut&quot;]/div[1]/div[4]/div[1]/span[1]/text()')
      print priceO
  parse('AAPL')
  </code></pre>
  <p>Output:</p>
  <pre><code>[]
  
  [Finished in 1.2s]
  </code></pre>