I am trying to get the data of a table into Google Sheets. The table on the website constantly gets new data added to to the top. (Latest trade data). I am really new to web scraping and HTML code. I'm not even sure if I am looking at the right HTML element or if I should be looking at XPATH for ImportXML.
The URL is: https://www.deribit.com/main#/options?tab=all
XPATH: //*[@id="tradesScrollC"]
Element: <div id="tradesScrollC" class="table-scrollable-deribit" style="max-height: 200px;overflow-y: auto" onscroll="BTCOptions.scrollTradesC(event);">
<table class="table table-hover table-condensed table-nopadding" float-thead="floatTheadOptions">
<thead>
<tr>
<th ng-i18next="app.assets">Assets</th>
<th ng-i18next="app.price">Price</th>
<th ng-i18next="app.imp_v">IV</th>
<th ng-i18next="app.Qty">Qty</th>
<th ng-i18next="app.time">Date Time</th>
</tr>
</thead>
<tbody id="last_trades_call"></tbody>
</table>
</div>
I have tried both importXML and importHTML, however, I am not sure what each tag is and if I'm using it correctly.
=IMPORTXML("https://www.deribit.com/main#/options?tab=all", "//div[@id='tradesScrollC']/table")
I would like to print all the trade data as it updates on the website, to also print on my google sheet. With column headers exactly like the website (Assets Price IV Qty Date Time)