(function extractHrefsAsBashArray() { const domain = window.location; const links = document.querySelectorAll('body main.container div.list table.table tbody tr td a'); const hrefsArray = Array.from(links).map(link => { const href = link.getAttribute('href'); return href ? (href.startsWith('http') ? href : domain + href) : ''; }).filter(href => href); console.log(`urls=(\n ${hrefsArray.map(href => `"${href}"`).join('\n ')}\n)`); })();