Microlink × Product Hunt

Interact with
producthunt.com

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

const produchunt = (url, opts) =>
  mql(url, {
    data: {
      name: {
        selector: 'h1',
        attr: 'text',
        type: 'string'
      },
      upvotes: {
        selector: 'button span span:nth-child(3)',
        attr: 'text',
        type: 'string'
      }
    },
    ...opts
  })

const result = await produchunt(
  'https://www.producthunt.com/posts/microlink-2-0'
)

mql.render(result)