MQL x Product Hunt

node v10.24.1
version: 1.0.1
endpointsharetweet
const mql = require('@microlink/mql') const productHunt = (id) => mql(`https://www.producthunt.com/posts/${id}`, { data: { name: { selector: 'h1 a', attr: 'text', type: 'string', }, upvotes: { selector: '.bigButtonCount_10448', attr: 'text', type: 'string', }, }, }) const productSlug = 'microlink-2-0' const { data } = await productHunt(productSlug) console.log(`'${data.name}' has ${data.upvotes} upvotes`)
Loading…

no comments

    sign in to comment