MQL x Hacker News

node v10.24.1
version: 1.0.1
endpointsharetweet
const mql = require('@microlink/mql') const hackerNews = () => mql('https://news.ycombinator.com/', { data: { posts: { selectorAll: '.athing', attr: { title: { type: 'title', selector: '.storylink', attr: 'text', }, url: { type: 'url', selector: '.storylink', attr: 'href', }, }, }, }, }) const { data } = await hackerNews() console.log('latest hacker news posts:', data.posts)
Loading…

no comments

    sign in to comment