How to find all links / pages on a website

后端 未结 5 1295
無奈伤痛
無奈伤痛 2020-11-30 17:36

Is it possible to find all the pages and links on ANY given website? I\'d like to enter a URL and produce a directory tree of all links from that site?

I\'ve looked

5条回答
  •  感动是毒
    2020-11-30 18:14

    If you have the developer console (JavaScript) in your browser, you can type this code in:

    urls = document.querySelectorAll('a'); for (url in urls) console.log(urls[url].href);
    

    Shortened:

    n=$$('a');for(u in n)console.log(n[u].href)
    

提交回复
热议问题