How do I get the Dividend from Google Finance?

817 views Asked by At

I have had this code run before, and Google Finance used to give me the Dividend and Yield in the dictionary it returns. How do I get that data now that it won't come in this dictionary?

from googlefinance import getQuotes
import json

print(json.dumps(getQuotes('D'), indent=2))

Which Used to Return:

[
   {
     "ID": "10020",
     "StockSymbol": "D",
     "Index": "NYSE",
     "LastTradePrice": "77.96",
     "LastTradeWithCurrency": "77.96",
     "LastTradeTime": "4:01PM EDT",
     "LastTradeDateTime": "2017-08-08T16:01:05Z",
     "LastTradeDateTimeLong": "Aug 8, 4:01PM EDT",
     "Dividend": "0.75",
     "Yield": "3.87"
   }
 ]

And now only returns:

 [
  {
     "ID": "10020",
     "StockSymbol": "D",
     "Index": "NYSE",
     "LastTradePrice": "77.96",
     "LastTradeWithCurrency": "77.96",
     "LastTradeTime": "4:01PM EDT",
     "LastTradeDateTime": "2017-08-08T16:01:05Z",
     "LastTradeDateTimeLong": "Aug 8, 4:01PM EDT",
   }
 ]
0

There are 0 answers