Microlink × Amazon

Interact with
amazon.com

amazon.js
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/Images-SI-Uranium-Ore/dp/B000796XXM')

mql.render(result)