const mql = require('@microlink/mql')
const amazon = (url, opts) =>
mql(url, {
data: {
price: {
selector: '#attach-base-product-price',
attr: 'val',
type: 'number'
},
currency: {
selector: '#attach-base-product-currency-symbol',
attr: 'val'
}
},
...opts
})
const result = await amazon('https://www.amazon.com/dp/B08FC6C75Y')
mql.render(result)