MQL x GitHub

node v10.24.1
version: 1.0.0
endpointsharetweet
const mql = require('@microlink/mql') const github = (username) => mql(`https://github.com/${username}`, { data: { stats: { selector: '.user-profile-nav nav', attr: { repositories: { selector: 'a:nth-child(2) > span', type: 'number' }, followers: { selector: 'a:nth-child(4) > span', type: 'number' }, followings: { selector: 'a:nth-child(5) > span', type: 'number' } } } } }) const username = 'kikobeats' const { response, data } = await github(username) console.log(`GitHub stats for @${username}:`, data.stats)
Loading…

no comments

    sign in to comment