3 ms·
This is a great read! Simple crawling of all the statements: Promise.all([...$$('a[href$="last.html"]')].map(aa => fetch(aa.href).then(a => a.text()).then(a =>
by jokethrowaway 6y ago
This is a great read!
Simple crawling of all the statements:
Promise.all([...$$('a[href$="last.html"]')].map(aa => fetch(aa.href).then(a => a.text()).then(a => a.replace(/(\n|\r|<[^->]>| )/g, '').match(/Last Statement:(.?)<!-- InstanceEndEditable -->/)).then(a => [aa.href, a && a[1].trim()]))).then(a => console.log(JSON.stringify(a)))