I grabbing stock quotes from the YAHOO finance API using CSV concept in Python. My problem is that yahoo is shutdown the connection at some stage. Sometimes after 100 polls, sometimes after 10000 polls. So I tried different thinks like waiting 1 hour between 1000 polls, try different concepts like :
try:
name = fetch.get_name(symbol + ex_code)
exchange = fetch.get_stock_exchange(symbol + ex_code)
except :
print 'going to sleep'
t.spleep(3600)
name = fetch.get_name(symbol + ex_code)
exchange = fetch.get_stock_exchange(symbol + ex_code)
print'Yahoo Fehler --- reconnect'
BUt I am not able to poll 3000 quotes from yahoo stable, yahoo kicks me out. Any advice what works ?
regards Adrian