title: How to get all links from a website with puppeteer
body: <p>Well, I would like a way to use the puppeteer and the for loop to get all the links on the site and add them to an array, in this case the links I want are not links that are in the html tags, they are links that are directly in the source code,  javascript file links etc... I want something like this:</p>
  <pre><code>array = [ ]
   for(L in links){
    array.push(L)
     //The code should take all the links and add these links to the array
   }
  </code></pre>
  <p>But how can I get all references to javascript style files and all URLs that are in the source code of a website?
  I just find a post and a question that teaches or shows how it gets the links from the  tag and not all the links from the source code.</p>
  <p>Supposing you want to get all the  tags on this page for example:</p>
  <blockquote>
  <p>view-source:<a href="https://www.nike.com/" rel="noreferrer">https://www.nike.com/</a></p>
  </blockquote>
  <p>How can I get all script tags and return to console?  I put <code>view-source:https://nike.com</code> because you can get the script tags, I don't know if you can do it without displaying the source code, but I thought about displaying and getting the script tag because that was the idea I had, however  I do not know how to do it</p>