3 ms·
very nice. one thing i'm missing tho is a callback functionality. for example i did a quick scraper for tesco.com { page(url:"http://www.tesco.com/groce
by lepunk 11y ago
very nice. one thing i'm missing tho is a callback functionality.
for example i did a quick scraper for tesco.com
{
page(url:"http://www.tesco.com/groceries/product/browse/default.aspx?N=4294793330&Ne=4294793660") {
items: query(selector:"li.product") {
title: text(selector:"span[data-title=true]")
price: text(selector:"span.linePrice")
url: attr(selector:"a:eq(0)", name:"href")
}
}
}
now the url field on the page is relative. it would be nice to have a callback param where i could execute a function on the result and prefix the url with "http://www.tesco.com" http://www.tesco.com"
trying to make a pull request now