I would love to scape data from this website: https://finviz.com/screener.ashx?v=141&f=sh_avgvol_o500,sh_curvol_o2000,sh_price_u50&o=-volume
I want to scrape the whole table. I tried using this :
function myFunction(start) {
var url = "https://finviz.com/screener.ashx?
v=141&f=sh_avgvol_o500,sh_curvol_o2000,sh_price_u50&o=-volume&r="+
start;
var fromText = '<tbody>';
var toText = '</tbody>';
var content = UrlFetchApp.fetch(url).getContentText();
var scraped = Parser
.data(content)
.from(fromText)
.to(toText)
.iterate();
}
I could scrape every element using xpath, but I think it would be quite slow.
Here is the html and the table:
Can I get the whole table ? Thanks