Images

Retrieve all the images of the target URL

images.js
const mql = require('@microlink/mql')

const images = async (url, opts) => {
  const { data } = await mql(url, {
    meta: false,
    data: {
      images: {
        selectorAll: 'img',
        attr: 'src',
        type: 'image'
      }
    },
    ...opts
  })

  return data.images
}

const result = await images('https://microlink.io')

mql.render(result)