2

I'm trying to verify stock ticker through google finance. For example: when I type in "IBEX", I'm expecting Google finance comes back with the second choice not the first one. How can I archive this?

ticker = 'IBEX'    
url="https://www.google.com/finance?q={}".format(ticker)

Searching stock ticker in google finance

Default result, not expected

Expected Result

xudesheng
  • 1,082
  • 11
  • 25

2 Answers2

2

The correct ticker is LON:IBEX, which you need to urlencode to LON%3AIBEX

Related: How to create a stock quote fetching app in python

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
0

This issue eventually is solved by using selenium. Both Firefox driver and PhantomJS work very well. With selenium, I don't need to worry about Google's limitation either on how many requests you can submit in short term.

xudesheng
  • 1,082
  • 11
  • 25