For example, get the quarterly numbers from https://finance.yahoo.com/quote/AAPL/financials?p=AAPL
Asked
Active
Viewed 70 times
1 Answers
0
Since the page is built client side (not server side) by javascript, you need to grab the json from the source code and parse it by
var source = UrlFetchApp.fetch(url).getContentText()
var jsonString = source.match(/(?<=root.App.main = ).*(?=}}}};)/g) + '}}}}'
var data = JSON.parse(jsonString)
you can then be able to retrieve all the data.

Mike Steelson
- 14,650
- 2
- 5
- 20