how to make a web crawler in javascript