Skip to content

Instantly share code, notes, and snippets.

@zoonderkins
Created January 20, 2018 08:56
Show Gist options
  • Save zoonderkins/4134be0cd84f08d97f549d1d66308b0e to your computer and use it in GitHub Desktop.
Save zoonderkins/4134be0cd84f08d97f549d1d66308b0e to your computer and use it in GitHub Desktop.
[Vanilla JS script scrab hacker news] #javascript
https://news.ycombinator.com/
JSON.stringify([...document.querySelectorAll('td.title:nth-child(3)')].map(el => ({
title: el.querySelector('a').innerText,
url: el.querySelector('a').getAttribute('href')
})), null, 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment