let s = "" let w = "\ntimeout 5\n" document.querySelectorAll('a[href*="mapdownload.php"]').forEach(e => s=s+w+"curl "+(e.href)+" > "+e.href.substr(e.href.lastIndexOf("=")+1)+".cw2") console.log(s)
Could be improved to collect links from all pages, but with 13 pages it was acceptable.