Hi - was wondering if anyone can help me scrape some data into Google Sheets.
I've just started getting into this whole "scraping" thing (yeah, only five years late). For listed stocks I can use GOOGLEFINANCE= and the Sheet populates nicely, but for things like warrants and bonds which aren't available I need another way to get the data.
An example would be from the following page:
http://www.asx.com.au/asx/markets/interestRateSecurityPrices.do?type=GOVERNMENT_BONDIf you go down to GSBK16, the value in the Valuation Price column (currently around 103.675) is the one I want to scrape. The way I've been trying to do it is using the formula:
=IMPORTXML("
http://www.asx.com.au/asx/markets/interestRateSecurityPrices.do?type=GOVERNMENT_BOND","//*[@id='content']/table[1]/tbody/tr[2]/td[13]")
Google Sheets thinks for a moment then gives me a "#N/A Error - Imported Contents is Empty" error.
The way I got the Xpath was to open the page in Opera, select and inspect the element, then right click and select "Copy Xpath". I also changed the double-quotes around "content" to single quotes, and put the entire Xpath string in double-quotes.
Pulling my hair out. Anyone with more experience able to see why this isn't working?