const mql = require('@microlink/mql')
const balenciaga = async (url, opts) => {
const result = await mql(url, {
prerender: true,
data: {
currency: {
selector: '[itemprop="priceCurrency"]',
attr: 'content'
},
price: {
selector: '[itemprop="price"]',
attr: 'content'
// type: 'number'
}
},
...opts
})
return result
}
const result = await balenciaga(
'https://www.balenciaga.com/en-us/speed-recycled-sneaker-black-white-645056W2DBQ1015.html'
)
mql.render(result)