4 ms·
Anyway, I prefer CSS selectors nowadays for querying html var text=await fetch('https://cors-anywhere.herokuapp.com/https://news.ycombinator.com/item?id=18
by 11235813213455 8y ago
Anyway, I prefer CSS selectors nowadays for querying html
var text=await fetch('https://cors-anywhere.herokuapp.com/https://news.ycombinator.com/item?id=18785255').then(r=>r.text())
var d=new DOMParser().parseFromString(text, 'text/html');
d.body.querySelector('.comment-tree').rows
- giancarlostoro 8y agoYeah I hadn't even considered just using JS. Makes sense if you're in the browser. Maybe with headless Chrome this is much more likely a solution.