I would like to fetch the stock code of warrant, say 57107, listed in Hong Kong Market.
Because googleFinance and yahooFinance does not have warrant details.
An article "https://stackoverflow.com/questions/68411743/importxml-cant-fetch-from-yahoo-finance-if-there-is-a-point-in-in-the-ticker" suggested ImportXML is not working. Therefore I am writing an app script to get it done.
function getXML(){
var aastockLink = 'http://www.aastocks.com/en/stocks/quote/quick-quote.aspx?symbol=57107'
var content = UrlFetchApp.fetch(aastockLink).getContentText();
var regex = /<span class="neg"><span class="arrowUpDn"[\s\S]*?\/span>([\s\S]*?)<\/span>/g;
Logger.log(regex.exec(content)[0]);
}
I am looking for fetching the closed price etc.
Thank you for your help