3 ms·
In that particular situation I imagine that a smart line of Javascript in the developer console would also have worked. Without the email file (so you must copy
by Thiez 7y ago
In that particular situation I imagine that a smart line of Javascript in the developer console would also have worked. Without the email file (so you must copy the result from the dev console), but it is considerably easier than using curl or wget when the page is behind a login page.
- malux85 7y agowe shared files on a mounted NAS. getting him the CSV was just a "cp" can you share the smart line of javascript? You have 60 seconds, go.
- ddkhd 7y agosomething like this: `document.getElementsByTagName('a').map(elem => elem.href)`
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]
- vxcwvxcw 7y agothis works at least in chrome console (to get link urls, not emails) [...($$('a'))].map(e => e.href)
- vxcwvxcw 7y agoI came up with: document.documentElement.innerHTML.split('\n').forEach( (line) => line.includes('mailto:') ? console.log(line) : 0 ) But please push this further (is there a shorter way to say document.documentElement.innerHTML ?)
- nawgszy 7y agoNot minimized but generates a file 'emails.txt': a = document.createElement('a'); a.download = 'emails.txt'; a.href = `data:text/plain,${Array.from(document.querySelectorAll('a')).map(a => a.href).filter(s => ~s.indexOf('mailto')).join(',')}`; document.body.appendChild(a); a.click();
- sushisource 7y agoThat's a really cool trick for creating a file you can download.