Microlink Recipe: SoundCloud — Microlink

Microlink × SoundCloud

Interact with
soundcloud.com

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

const soundcloud = async (url, opts) => {
  const result = await mql(url, {
    prerender: true,
    audio: true,
    data: {
      plays: {
        selector: '.sc-ministats-plays .sc-visuallyhidden',
        type: 'number'
      }
    },
    ...opts
  })

  return result
}

const result = await soundcloud(
  'https://soundcloud.com/beautybrainsp/beauty-brain-swag-bandicoot'
)

mql.render(result)